You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.8 KiB
76 lines
1.8 KiB
apply plugin: 'com.android.application'
|
|
|
|
String SDK_DIR = System.getenv("ANDROID_HOME")
|
|
if (SDK_DIR == null) {
|
|
Properties props = new Properties()
|
|
props.load(new FileInputStream(project.rootProject.file("local.properties")))
|
|
SDK_DIR = props.get('sdk.dir')
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
|
|
sourceSets{
|
|
main{
|
|
jniLibs.srcDir(['libs'])
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.huanglong.imstandbyservice"
|
|
minSdkVersion 29
|
|
targetSdkVersion 29
|
|
versionCode 1
|
|
versionName "1.0"
|
|
ndk.abiFilters "arm64-v8a", "armeabi-v7a"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
abortOnError false
|
|
}
|
|
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.all {
|
|
outputFileName = "ImStandbyService.apk"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
implementation 'com.linkedin.dexmaker:dexmaker-mockito:2.12.1'
|
|
compileOnly files('libs/framework.jar')
|
|
}
|
|
|
|
String rootBuildDir = rootProject.buildDir.getParent()
|
|
task copyPrivJars(type:Copy) {
|
|
from "${SDK_DIR}/platforms/android-29/framework.jar"
|
|
into "libs/"
|
|
|
|
}
|
|
|
|
preBuild.dependsOn 'copyPrivJars'
|
|
|
|
task cleanPrivJars {
|
|
doLast {
|
|
delete 'libs/framework.jar'
|
|
}
|
|
}
|
|
|
|
build.finalizedBy(cleanPrivJars)
|