-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.gradle
executable file
·62 lines (55 loc) · 1.8 KB
/
common.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'
android {
buildFeatures {
viewBinding true
}
compileSdk rootProject.ext.compileSdk
defaultConfig {
minSdkVersion rootProject.ext.minSdk
targetSdkVersion rootProject.ext.targetSdk
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
compileOptions {
sourceCompatibility rootProject.ext.javaSourceCompatibility
targetCompatibility rootProject.ext.javaSourceCompatibility
}
kotlinOptions {
jvmTarget = rootProject.ext.kotlinOptionsJvmTarget
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.kotlinStdlibJdk8
implementation rootProject.ext.appcompat
implementation rootProject.ext.material
implementation rootProject.ext.coreKtx
testImplementation rootProject.ext.junit
androidTestImplementation rootProject.ext.junitX
androidTestImplementation rootProject.ext.espressoCore
}
// 唯一标识 每个组件都要指定
def ARTIFACT_ID = group.toString()
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
println ARTIFACT_ID
from components.release
groupId = 'com.github.jaydroid1024'
artifactId = ARTIFACT_ID
}
}
}
}