|
@@ -4,7 +4,6 @@ import java.util.Properties
|
|
|
plugins {
|
|
plugins {
|
|
|
alias(libs.plugins.compose.compiler)
|
|
alias(libs.plugins.compose.compiler)
|
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.android.application)
|
|
|
- alias(libs.plugins.kotlin.android)
|
|
|
|
|
alias(libs.plugins.kotlin.parcelize)
|
|
alias(libs.plugins.kotlin.parcelize)
|
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
|
alias(libs.plugins.room)
|
|
alias(libs.plugins.room)
|
|
@@ -32,12 +31,6 @@ android {
|
|
|
compileSdk = 37
|
|
compileSdk = 37
|
|
|
namespace = "io.legado.app"
|
|
namespace = "io.legado.app"
|
|
|
|
|
|
|
|
- kotlin {
|
|
|
|
|
- jvmToolchain {
|
|
|
|
|
- languageVersion.set(JavaLanguageVersion.of(21))
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
signingConfigs {
|
|
signingConfigs {
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
|
create("myConfig") {
|
|
create("myConfig") {
|
|
@@ -139,31 +132,6 @@ android {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- applicationVariants.all {
|
|
|
|
|
- val variant = this
|
|
|
|
|
- outputs.all {
|
|
|
|
|
- val output = this as com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
|
|
|
|
- val abi = output.getFilter(com.android.build.OutputFile.ABI)
|
|
|
|
|
- val flavor = variant.productFlavors[0].name
|
|
|
|
|
- val baseVersionName = variant.versionName
|
|
|
|
|
- var apkName = "${appName}_${flavor}_${baseVersionName}"
|
|
|
|
|
- if (abi != null) {
|
|
|
|
|
- apkName += "_$abi"
|
|
|
|
|
- }
|
|
|
|
|
- output.outputFileName = "$apkName.apk"
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- room {
|
|
|
|
|
- schemaDirectory("$projectDir/schemas")
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- ksp {
|
|
|
|
|
- arg("room.incremental", "true")
|
|
|
|
|
- arg("room.expandProjection", "true")
|
|
|
|
|
- arg("room.generateKotlin", "false")
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
compileOptions {
|
|
compileOptions {
|
|
|
isCoreLibraryDesugaringEnabled = true
|
|
isCoreLibraryDesugaringEnabled = true
|
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
@@ -175,7 +143,7 @@ android {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
sourceSets {
|
|
|
- getByName("androidTest").assets.srcDirs("$projectDir/schemas")
|
|
|
|
|
|
|
+ getByName("androidTest").assets.directories.add("$projectDir/schemas")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
lint {
|
|
lint {
|
|
@@ -183,6 +151,22 @@ android {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+kotlin {
|
|
|
|
|
+ jvmToolchain {
|
|
|
|
|
+ languageVersion.set(JavaLanguageVersion.of(21))
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+room {
|
|
|
|
|
+ schemaDirectory("$projectDir/schemas")
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+ksp {
|
|
|
|
|
+ arg("room.incremental", "true")
|
|
|
|
|
+ arg("room.expandProjection", "true")
|
|
|
|
|
+ arg("room.generateKotlin", "false")
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
dependencies {
|
|
dependencies {
|
|
|
coreLibraryDesugaring(libs.desugar)
|
|
coreLibraryDesugaring(libs.desugar)
|
|
|
testImplementation(libs.junit)
|
|
testImplementation(libs.junit)
|