x80486
07/06/2018, 3:43 AMsubprojects { }
but so far is not letting me 🧌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.
x80486
07/06/2018, 4:00 AMx80486
07/06/2018, 4:01 AMgildor
07/06/2018, 5:12 AMcompile
for yougildor
07/06/2018, 5:13 AM"compile"("some:dep:1.2.3")
insteadgildor
07/06/2018, 5:13 AMx80486
07/07/2018, 12:19 AMgildor
07/09/2018, 2:07 AMx80486
07/09/2018, 2:08 AMsubprojects {
dependencies {}
}
x80486
07/09/2018, 2:08 AMgildor
07/09/2018, 2:20 AMgildor
07/09/2018, 2:23 AMx80486
07/09/2018, 2:28 AMx80486
07/09/2018, 2:29 AMdependencies { ... }
block from `mod-*`'s build.gradle.kts
and have that block only in ${root.project}/build.gradle.kts
x80486
07/09/2018, 2:30 AMgildor
07/09/2018, 2:55 AMgildor
07/09/2018, 2:56 AMgildor
07/09/2018, 2:58 AMgildor
07/09/2018, 2:59 AMgildor
07/09/2018, 3:06 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...x80486
07/09/2018, 3:14 AMgildor
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.gildor
07/09/2018, 3:24 AMcompile
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