apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
defaultConfig {
applicationId "包名"
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionName rootProject.ext.android.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
office_release {
keyAlias 'xxxx'
keyPassword 'xxxx'
//D:\workspace\sh_office
storeFile file('D:/xxx/xxx/xxx.jks')
storePassword 'xxxx'
v1SigningEnabled true
v2SigningEnabled true
}
debug {
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.office_release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
signingConfig signingConfigs.office_release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java']
jniLibs.srcDirs = ['libs']
}
}
// This is important, it will run lint checks but won't abort build
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
// 保证其他的lib没有被preDex
dexOptions {
preDexLibraries = false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
tasks.withType(JavaCompile) {
options.encoding = "utf-8"
}
dexOptions {
javaMaxHeapSize '2g'
}
applicationVariants.all { variant ->
variant.outputs.all { output ->
def fileName
if (variant.buildType.name == "release") {
fileName = "xxx.apk"
} else {
fileName = "xxx_debug.apk"
}
outputFileName = fileName
}
}
defaultConfig {
ndk {
//设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
abiFilters "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64"
}
manifestPlaceholders = [
JPUSH_PKGNAME: "com.hbean.ste.ioffice",
JPUSH_APPKEY : "e1327cac7773d5b1dd532dbe", //JPush上注册的包名对应的appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
}
productFlavors {
}
}
//Resolved versions for app (26.1.0) and test app (27.1.1) differ
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:27.1.1'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
//noinspection GradleCompatible
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation project(':library')
}
app build file记录
最新推荐文章于 2023-09-29 09:32:24 发布