build: replace buildSrc with includeBuild
Signed-off-by: keta1 <k@ketal.icu>
This commit is contained in:
@@ -20,56 +20,14 @@
|
||||
* <https://github.com/cinit/QAuxiliary/blob/master/LICENSE.md>.
|
||||
*/
|
||||
|
||||
import com.android.build.gradle.BaseExtension
|
||||
|
||||
plugins {
|
||||
id("io.github.qauxv.version")
|
||||
id("com.android.application") version "7.2.2" apply false
|
||||
id("com.android.library") version "7.2.2" apply false
|
||||
id("org.jetbrains.kotlin.android") version Version.kotlin apply false
|
||||
kotlin("plugin.serialization") version Version.kotlin apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.7.10" apply false
|
||||
kotlin("plugin.serialization") version "1.7.10" apply false
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean").configure {
|
||||
delete(rootProject.buildDir)
|
||||
}
|
||||
|
||||
val apiCode by extra(93)
|
||||
val verCode = Common.getBuildVersionCode(rootProject)
|
||||
// versionName = major.minor.bugfix.rev.commit
|
||||
val verName = "1.2.14" + (Common.getGitHeadRefsSuffix(rootProject))
|
||||
val androidTargetSdkVersion by extra(33)
|
||||
val androidMinSdkVersion by extra(24)
|
||||
val androidCompileSdkVersion by extra(32)
|
||||
val androidBuildToolsVersion by extra("32.0.0")
|
||||
val androidCompileNdkVersion = Version.getNdkVersion(project)
|
||||
|
||||
fun Project.configureBaseExtension() {
|
||||
extensions.findByType(BaseExtension::class)?.run {
|
||||
compileSdkVersion(androidCompileSdkVersion)
|
||||
ndkVersion = androidCompileNdkVersion
|
||||
buildToolsVersion = androidBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = androidMinSdkVersion
|
||||
targetSdk = androidTargetSdkVersion
|
||||
versionCode = verCode
|
||||
versionName = verName
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = Version.java
|
||||
targetCompatibility = Version.java
|
||||
}
|
||||
|
||||
packagingOptions.jniLibs.useLegacyPackaging = false
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
plugins.withId("com.android.application") {
|
||||
configureBaseExtension()
|
||||
}
|
||||
plugins.withId("com.android.library") {
|
||||
configureBaseExtension()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user