Auto.js/app/build.gradle
2022-01-15 21:16:39 +08:00

215 lines
7.5 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.jakewharton.butterknife'
def AAVersion = '4.8.0'
def SupportLibVersion = '28.0.0'
def homePath = System.properties['user.home']
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:${SupportLibVersion}"
force "com.android.support:support-v4:${SupportLibVersion}"
}
}
android {
signingConfigs {
release {
storeFile file(homePath + '/auto-js-t-pkcs12.jks')
storePassword 'fixture'
keyPassword 'fixture'
keyAlias = 'autojs-t'
}
debug {
storeFile file(homePath + '/auto-js-t-pkcs12.jks')
storePassword 'fixture'
keyPassword 'fixture'
keyAlias = 'autojs-t'
}
}
compileSdkVersion versions.compile
buildToolsVersion versions.buildTool
defaultConfig {
applicationId "com.taobao.idlefish"
minSdkVersion versions.mini
targetSdkVersion versions.target
versionCode versions.appVersionCode
versionName versions.appVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"resourcePackageName": "org.autojs.autojs"
]
}
}
ndk { }
}
buildTypes {
debug {
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
applicationIdSuffix ".debug"
}
release {
// debuggable true
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
applicationIdSuffix ".x"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
encoding = 'utf-8'
}
lintOptions {
disable 'MissingTranslation'
disable 'ExtraTranslation'
abortOnError false
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
}
flavorDimensions "channel"
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86 and x86_64.
// Resets the list of ABIs that Gradle should create APKs for to none.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
// include "x86", "armeabi-v7a"
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk false
}
}
productFlavors {
common {
buildConfigField "String", "CHANNEL", '"common"'
}
coolapk {
buildConfigField "String", "CHANNEL", '"coolapk"'
}
}
// 避免压缩TensorFlow
// aaptOptions {
// noCompress "tflite"
// }
}
repositories {
google()
}
dependencies {
// TensorFlow-lite
// implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1-alpha01', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation "junit:junit:$junit_version"
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0"
// Android Annotations
kapt "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
// ButterKnife
implementation('com.jakewharton:butterknife:10.2.3', {
exclude group: 'com.android.support'
})
kapt 'com.jakewharton:butterknife-compiler:10.2.3'
// Android supports
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.multidex:multidex:2.0.1'
// Personal libraries
implementation 'com.github.hyb1996:MutableTheme:1.0.0'
// Material Dialogs
implementation('com.afollestad.material-dialogs:core:0.9.2.3', {
exclude group: 'com.android.support'
})
// Common Markdown
implementation 'com.github.atlassian:commonmark-java:commonmark-parent-0.9.0'
// Android issue reporter (a github issue reporter)
implementation('com.heinrichreimersoftware:android-issue-reporter:1.3.1', {
exclude group: 'com.afollestad.material-dialogs'
exclude group: 'com.android.support'
})
//MultiLevelListView
implementation 'com.github.hyb1996:android-multi-level-listview:1.1'
//Licenses Dialog
implementation 'de.psdev.licensesdialog:licensesdialog:1.8.1'
//Expandable RecyclerView
implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
//FlexibleDivider
implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0'
//???
implementation 'com.wang.avi:library:2.1.3'
//Commons-lang
implementation 'org.apache.commons:commons-lang3:3.12.0'
//Expandable RecyclerView
implementation 'com.thoughtbot:expandablerecyclerview:1.3'
implementation 'com.github.hyb1996:Auto.js-ApkBuilder:1.0.1'
// RxJava
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
//Glide
implementation('com.github.bumptech.glide:glide:4.12.0', {
exclude group: 'com.android.support'
})
kapt 'com.github.bumptech.glide:compiler:4.12.0'
//joda time
implementation 'joda-time:joda-time:2.10.13'
// Tasker Plugin
implementation 'com.twofortyfouram:android-plugin-client-sdk-for-locale:4.0.3'
// Flurry
implementation 'com.flurry.android:analytics:13.1.0@aar'
// Bugly
implementation 'com.tencent.bugly:crashreport:4.0.0'
implementation 'com.tencent.bugly:nativecrashreport:3.9.2'
// MaterialDialogCommon
implementation('com.afollestad.material-dialogs:commons:0.9.6.0', {
exclude group: 'com.android.support'
})
// WorkManager
implementation 'androidx.work:work-runtime:2.7.1'
// Android job
implementation 'com.evernote:android-job:1.4.2'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
// Optional, if you use support library fragments:
debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.3'
implementation project(':automator')
implementation project(':common')
implementation project(':autojs')
}