x80486
07/06/2018, 3:43 AMsubprojects { }
but so far is not letting me :trollface:gildor
07/06/2018, 3:52 AMsubprojects {
dependencies {}
}
Also you can apply dependencies to modules with specific pluginx80486
07/06/2018, 3:59 AM> Configure project :
Evaluating root project 'kotlin-akka2' using build file '/home/gorre/Workshop/Development/kotlin/kotlin-akka2/build.gradle.kts'.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/gorre/Workshop/Development/kotlin/kotlin-akka2/build.gradle.kts' line: 30
* What went wrong:
Configuration with name 'compile' not found.
gildor
07/06/2018, 5:12 AMcompile
for you"compile"("some:dep:1.2.3")
insteadx80486
07/07/2018, 12:19 AMgildor
07/09/2018, 2:07 AMx80486
07/09/2018, 2:08 AMsubprojects {
dependencies {}
}
gildor
07/09/2018, 2:20 AMx80486
07/09/2018, 2:28 AMdependencies { ... }
block from `mod-*`'s build.gradle.kts
and have that block only in ${root.project}/build.gradle.kts
gildor
07/09/2018, 2:55 AMx80486
07/09/2018, 3:13 AM"compile"
, "testCompile"
, etc. is a required thing? That looks weird...like super weird. I hope that changes in the future...gildor
07/09/2018, 3:21 AMadd("compile", "your:dependency:1.2.3")
And yes, it’s required thing, as I mentioned on my first comment:
https://kotlinlang.slack.com/archives/C19FD9681/p1530853992000059?thread_ts=1530848619.000148&cid=C19FD9681
https://kotlinlang.slack.com/archives/C19FD9681/p1530854016000033?thread_ts=1530848619.000148&cid=C19FD9681
Static accessor for configuration is not a global thing, different plugins provide different configurations, so kotlin-dsl do not allow you to use accessors that probably doesn’t exist for this module, because you apply configuration dynamically.compile
is configuration of Kotlin plugin, and because you apply this plugin dynamically (on runtime of build), you have to use dynamic syntax, no type safe checks. Exactly the same happening in Groovy, but there Gradle handles all dynamic method calls
To use static typed accessors you must use plugins
dsl block, but unfortunately you cannot share this for multiple plugins