sergei.lebedev
05/12/2017, 9:28 PMtask sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
suresh
05/12/2017, 10:34 PMval sourceSets = java.sourceSets
val SourceSetContainer.main: SourceSet get() = this["main"]
val SourceSetContainer.test: SourceSet get() = this["test"]
val SourceSet.kotlin: SourceDirectorySet get() =
(this as HasConvention).convention.getPlugin<KotlinSourceSet>().kotlin
sourceSets.main
sergei.lebedev
05/12/2017, 10:38 PMjava
, it refers to java
the package.mkobit
05/12/2017, 11:12 PMthe<JavaPluginConvention>().sourceSets
sergei.lebedev
05/12/2017, 11:14 PMmkobit
05/12/2017, 11:20 PMjava
plugin which creates a convention object named java
of type JavaPluginConvention
. then a top level extension method Project.java(JavaPluginConvention.() -> Unit): Unit
(something like that) is generated. the same is true for extension
objects
https://github.com/gradle/gradle-script-kotlin/releases/tag/v0.8.0 is more thorough and probably a better explanation than i can givesuresh
05/13/2017, 2:14 AM./gradlew gskGenerateAccessors
. After that you can refer java
in your script.sergei.lebedev
05/14/2017, 8:54 PM