| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- plugins {
- id "com.android.application"
- id "kotlin-android"
- id "kotlin-parcelize"
- }
- def keystorePwd = null
- def alias = null
- def pwd = null
- Properties properties
- def base64 = System.getenv("LOCAL_PROPERTIES")
- if (base64 != null && !base64.isBlank()) {
- properties = new Properties()
- properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64)))
- } else if (project.rootProject.file("local.properties").exists()) {
- properties = new Properties()
- properties.load(project.rootProject.file("local.properties").newDataInputStream())
- }
- if (properties != null) {
- keystorePwd = properties.getProperty("KEYSTORE_PASS")
- alias = properties.getProperty("ALIAS_NAME")
- pwd = properties.getProperty("ALIAS_PASS")
- }
- keystorePwd = keystorePwd ?: System.getenv("KEYSTORE_PASS")
- alias = alias ?: System.getenv("ALIAS_NAME")
- pwd = pwd ?: System.getenv("ALIAS_PASS")
- android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
- defaultConfig {
- applicationId "io.nekohasekai.sagernet.plugin.relaybaton"
- minSdkVersion 21
- targetSdkVersion 30
- versionCode 2
- versionName "0.6.0-ech-1"
- }
- signingConfigs {
- release {
- storeFile rootProject.file("release.keystore")
- storePassword keystorePwd
- keyAlias alias
- keyPassword pwd
- }
- }
- buildTypes {
- release {
- minifyEnabled true
- shrinkResources true
- proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "../plugin/proguard-rules.pro"
- signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- coreLibraryDesugaringEnabled true
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
- packagingOptions {
- exclude "/META-INF/*.version"
- exclude "/META-INF/*.kotlin_module"
- exclude "/META-INF/native-image/**"
- exclude "/META-INF/INDEX.LIST"
- exclude "DebugProbesKt.bin"
- exclude "/kotlin/**"
- }
- splits {
- abi {
- enable true
- universalApk false
- }
- }
- applicationVariants.all { variant ->
- variant.outputs.all { output ->
- outputFileName = outputFileName
- .replace("rb-", "relaybaton-")
- .replace("plugin", "plugin-" + variant.versionName)
- .replace("-release", "")
- }
- }
- }
- dependencies {
- implementation project(":plugin")
- coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
- }
|