|
|
|
@ -16,8 +16,7 @@ def version = "3." + releaseTime() |
|
|
|
|
def gitCommits = Integer.parseInt('git rev-list HEAD --count'.execute().text.trim()) |
|
|
|
|
|
|
|
|
|
android { |
|
|
|
|
compileSdkVersion 33 |
|
|
|
|
buildToolsVersion "33.0.0" |
|
|
|
|
compileSdk 33 |
|
|
|
|
namespace 'io.legado.app' |
|
|
|
|
kotlinOptions { |
|
|
|
|
jvmTarget = "11" |
|
|
|
@ -39,14 +38,16 @@ android { |
|
|
|
|
} |
|
|
|
|
defaultConfig { |
|
|
|
|
applicationId "io.legado.app" |
|
|
|
|
minSdkVersion 21 |
|
|
|
|
targetSdkVersion 33 |
|
|
|
|
minSdk 21 |
|
|
|
|
targetSdk 33 |
|
|
|
|
versionCode 10000 + gitCommits |
|
|
|
|
versionName version |
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
|
|
|
|
project.ext.set("archivesBaseName", name + "_" + version) |
|
|
|
|
multiDexEnabled true |
|
|
|
|
|
|
|
|
|
buildConfigField "String", "Cronet_Version", "\"$CronetVersion\"" |
|
|
|
|
|
|
|
|
|
javaCompileOptions { |
|
|
|
|
annotationProcessorOptions { |
|
|
|
|
arguments += [ |
|
|
|
@ -63,7 +64,6 @@ android { |
|
|
|
|
} |
|
|
|
|
buildTypes { |
|
|
|
|
release { |
|
|
|
|
buildConfigField "String", "Cronet_Version", "\"$CronetVersion\"" |
|
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) { |
|
|
|
|
signingConfig signingConfigs.myConfig |
|
|
|
|
} |
|
|
|
@ -73,7 +73,7 @@ android { |
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
|
|
|
|
} |
|
|
|
|
debug { |
|
|
|
|
buildConfigField "String", "Cronet_Version", "\"$CronetVersion\"" |
|
|
|
|
|
|
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) { |
|
|
|
|
signingConfig signingConfigs.myConfig |
|
|
|
|
} |
|
|
|
@ -82,23 +82,25 @@ android { |
|
|
|
|
minifyEnabled false |
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
android.applicationVariants.all { variant -> |
|
|
|
|
variant.outputs.all { |
|
|
|
|
def flavor = variant.productFlavors[0].name |
|
|
|
|
outputFileName = "${name}_${flavor}_${defaultConfig.versionName}.apk" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
flavorDimensions "mode" |
|
|
|
|
|
|
|
|
|
flavorDimensions.add("mode") |
|
|
|
|
productFlavors { |
|
|
|
|
app { |
|
|
|
|
dimension "mode" |
|
|
|
|
manifestPlaceholders = [APP_CHANNEL_VALUE: "app"] |
|
|
|
|
manifestPlaceholders.put("APP_CHANNEL_VALUE", "app") |
|
|
|
|
} |
|
|
|
|
google { |
|
|
|
|
dimension "mode" |
|
|
|
|
applicationId "io.legado.play" |
|
|
|
|
manifestPlaceholders = [APP_CHANNEL_VALUE: "google"] |
|
|
|
|
manifestPlaceholders.put("APP_CHANNEL_VALUE", "google") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
compileOptions { |
|
|
|
@ -125,6 +127,7 @@ android { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dependencies { |
|
|
|
|
compileOnly "com.android.tools.build:gradle:$agp_version" |
|
|
|
|
//noinspection GradleDependency,GradlePackageUpdate |
|
|
|
|
coreLibraryDesugaring('com.android.tools:desugar_jdk_libs:1.2.2') |
|
|
|
|
testImplementation('junit:junit:4.13.2') |
|
|
|
@ -211,7 +214,7 @@ dependencies { |
|
|
|
|
implementation(fileTree(dir: 'cronetlib', include: ['*.jar', '*.aar'])) |
|
|
|
|
|
|
|
|
|
//Glide |
|
|
|
|
def glideVersion = "4.14.0" |
|
|
|
|
def glideVersion = "4.14.1" |
|
|
|
|
implementation("com.github.bumptech.glide:glide:$glideVersion") |
|
|
|
|
kapt("com.github.bumptech.glide:compiler:$glideVersion") |
|
|
|
|
|
|
|
|
@ -227,7 +230,7 @@ dependencies { |
|
|
|
|
implementation('com.jaredrummler:colorpicker:1.1.0') |
|
|
|
|
|
|
|
|
|
//apache |
|
|
|
|
implementation('org.apache.commons:commons-text:1.9') |
|
|
|
|
implementation('org.apache.commons:commons-text:1.10.0') |
|
|
|
|
|
|
|
|
|
//MarkDown |
|
|
|
|
def markwonVersion = "4.6.2" |
|
|
|
|