mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Use K2 to compile buildSrc
Make all Kotlin source code build with K2. K2 seems to have bugs with lazy property assignment, revert it to set().
This commit is contained in:
parent
a97191052b
commit
b38ab2a7d6
@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
}
|
}
|
||||||
@ -16,6 +18,12 @@ gradlePlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
languageVersion = "2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("gradle-plugin", "2.0.0"))
|
implementation(kotlin("gradle-plugin", "2.0.0"))
|
||||||
implementation("com.android.tools.build:gradle:8.5.1")
|
implementation("com.android.tools.build:gradle:8.5.1")
|
||||||
|
@ -308,7 +308,7 @@ fun Project.setupAppCommon() {
|
|||||||
this.comment = "version=${Config.version}\n" +
|
this.comment = "version=${Config.version}\n" +
|
||||||
"versionCode=${Config.versionCode}\n" +
|
"versionCode=${Config.versionCode}\n" +
|
||||||
"stubVersion=${Config.stubVersion}\n"
|
"stubVersion=${Config.stubVersion}\n"
|
||||||
this.outFolder = layout.buildDirectory.dir("outputs/apk/${variant.name}")
|
this.outFolder.set(layout.buildDirectory.dir("outputs/apk/${variant.name}"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -323,8 +323,8 @@ fun Project.setupStub() {
|
|||||||
project.tasks.register("${variantName}ManifestProducer", ManifestUpdater::class.java) {
|
project.tasks.register("${variantName}ManifestProducer", ManifestUpdater::class.java) {
|
||||||
dependsOn("generate${variantCapped}ObfuscatedClass")
|
dependsOn("generate${variantCapped}ObfuscatedClass")
|
||||||
applicationId = variant.applicationId
|
applicationId = variant.applicationId
|
||||||
appClassDir = layout.buildDirectory.dir("generated/source/app/$variantName")
|
appClassDir.set(layout.buildDirectory.dir("generated/source/app/$variantName"))
|
||||||
factoryClassDir = layout.buildDirectory.dir("generated/source/factory/$variantName")
|
factoryClassDir.set(layout.buildDirectory.dir("generated/source/factory/$variantName"))
|
||||||
}
|
}
|
||||||
variant.artifacts.use(manifestUpdater)
|
variant.artifacts.use(manifestUpdater)
|
||||||
.wiredWithFiles(
|
.wiredWithFiles(
|
||||||
|
Loading…
Reference in New Issue
Block a user