You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.6 KiB
Groovy
88 lines
2.6 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
}
|
|
|
|
def AppMajorVersion = 1
|
|
def AppMinorVersion = 0
|
|
def AppBuildNumber = 9
|
|
|
|
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
|
|
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
|
|
|
|
android {
|
|
compileSdk 32
|
|
|
|
defaultConfig {
|
|
applicationId "com.xypower.frpandroid"
|
|
minSdk 24
|
|
targetSdk 28
|
|
versionCode AppVersionCode
|
|
versionName AppVersionName
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
buildConfigField("String", "FrpVersion", '"0.56.0"')
|
|
buildConfigField("String", "FrpcFileName", '"libfrpc.so"')
|
|
buildConfigField("String", "LogFileName", '"frpc.log"')
|
|
buildConfigField("String", "ConfigFileName", '"config.toml"')
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
jniLibs.srcDirs = ['libs']
|
|
}
|
|
}
|
|
|
|
packagingOptions {
|
|
jniLibs {
|
|
useLegacyPackaging true
|
|
}
|
|
}
|
|
splits {
|
|
abi {
|
|
// enable true
|
|
enable false
|
|
reset()
|
|
// include "arm64-v8a", "x86_64", "armeabi-v7a"
|
|
include "arm64-v8a"
|
|
universalApk true
|
|
}
|
|
}
|
|
|
|
android.applicationVariants.all { variant ->
|
|
variant.outputs.all { output ->
|
|
if (outputFileName.endsWith('.apk')) {
|
|
def buildTypeFlag = "dbg"
|
|
if(variant.buildType.name.equals('release')) {
|
|
buildTypeFlag = "rel"
|
|
}
|
|
def fileName = "xyfrp_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}.apk"
|
|
outputFileName = fileName
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
//noinspection GradleCompatible
|
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
|
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
|
implementation 'org.jetbrains:annotations:15.0'
|
|
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
|
|
implementation files('libs/common-release.aar')
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
|
} |