Minor: cleanup
This commit is contained in:
+2
-10
@@ -302,7 +302,7 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
|||||||
val projectVersion = loadKotlinVersionFromResource(log)
|
val projectVersion = loadKotlinVersionFromResource(log)
|
||||||
val kotlinAnnotationProcessingDep = "org.jetbrains.kotlin:kotlin-annotation-processing:$projectVersion"
|
val kotlinAnnotationProcessingDep = "org.jetbrains.kotlin:kotlin-annotation-processing:$projectVersion"
|
||||||
|
|
||||||
ext.sourceSets.all(Action<AndroidSourceSet> { sourceSet ->
|
ext.sourceSets.all { sourceSet ->
|
||||||
if (sourceSet is HasConvention) {
|
if (sourceSet is HasConvention) {
|
||||||
val sourceSetName = sourceSet.name
|
val sourceSetName = sourceSet.name
|
||||||
val kotlinSourceSet = KotlinSourceSetImpl(sourceSetName, project.fileResolver)
|
val kotlinSourceSet = KotlinSourceSetImpl(sourceSetName, project.fileResolver)
|
||||||
@@ -313,17 +313,9 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
|||||||
aptConfigurations.put(sourceSet.name,
|
aptConfigurations.put(sourceSet.name,
|
||||||
project.createAptConfiguration(sourceSet.name, kotlinAnnotationProcessingDep))
|
project.createAptConfiguration(sourceSet.name, kotlinAnnotationProcessingDep))
|
||||||
|
|
||||||
/*TODO: before 0.11 gradle android plugin there was:
|
|
||||||
sourceSet.getAllJava().source(kotlinDirSet)
|
|
||||||
sourceSet.getAllSource().source(kotlinDirSet)
|
|
||||||
AndroidGradleWrapper.getResourceFilter(sourceSet)?.exclude(KSpec({ elem ->
|
|
||||||
kotlinDirSet.contains(elem.getFile())
|
|
||||||
}))
|
|
||||||
but those methods were removed so commented as temporary hack*/
|
|
||||||
|
|
||||||
project.logger.kotlinDebug("Created kotlin sourceDirectorySet at ${kotlinDirSet.srcDirs}")
|
project.logger.kotlinDebug("Created kotlin sourceDirectorySet at ${kotlinDirSet.srcDirs}")
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
val extensions = (ext as ExtensionAware).extensions
|
val extensions = (ext as ExtensionAware).extensions
|
||||||
extensions.add("kotlinOptions", K2JVMCompilerArguments::class.java)
|
extensions.add("kotlinOptions", K2JVMCompilerArguments::class.java)
|
||||||
|
|||||||
-4
@@ -28,10 +28,6 @@ class AndroidGradleWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static def srcDir(Object androidSourceSet, Object kotlinDirSet) {
|
static def srcDir(Object androidSourceSet, Object kotlinDirSet) {
|
||||||
/*before 0.11 gradle android plugin there was:
|
|
||||||
androidSourceSet.getAllJava().source(kotlinDirSet)
|
|
||||||
androidSourceSet.getAllSource().source(kotlinDirSet)
|
|
||||||
but those methods were removed so as temporary hack next code was suggested*/
|
|
||||||
androidSourceSet.getJava().srcDir(kotlinDirSet)
|
androidSourceSet.getJava().srcDir(kotlinDirSet)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user