-
Notifications
You must be signed in to change notification settings - Fork 87
/
build.gradle
57 lines (47 loc) · 2.38 KB
/
build.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
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.feelschaotic.business_sdk"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
// implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
if (isAppModule.toBoolean()) {
//这种情况下就不能引用项目了喂,需要引用sdk库,类似于这样
// implementation 'com.feelschaotic.samplesdk:1.0.0'
//因为我把maven的配置删掉了,所以以本地aar的方式引入插桩的sdk(插桩意味着支持了热更新)
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
//因为没有把samplesdk上传到maven,只是打个aar包放在lib下引用一下,所以需要导入SDKHotFix库(没有pom文件,下不了依赖)
//如果你的业务sdk已经上传了maven,那就可以删掉这条导包了
implementation 'com.github.feelschaotic:SDKHotFix:1.12-RELEASE'
} else {
// 默认用的是插桩的sdk1.0.0(有bug的sdk)
// 不要再问为什么改了samplesdk module代码运行不生效了!因为这里压根就没有直接引用module
// 为什么我不直接引用module(无插桩,不支持热更)?我怕有小伙伴拿着demo一跑就问我,为什么补丁没生效呀!?
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
implementation 'com.github.feelschaotic:SDKHotFix:1.12-RELEASE'
}
}