build.gradle
1.91 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import java.text.SimpleDateFormat
apply plugin: 'com.android.library'
//apply plugin: 'com.jfrog.bintray'
//apply plugin: 'com.github.dcendents.android-maven'
static def buildTime() {
def df = new SimpleDateFormat("MMddHHmm")
return df.format(new Date())
}
// versionCode按时间自增
static def increasedVersionCode(){
return (int)(System.currentTimeMillis()/1000/60)
}
def baseVersion = "1.1.0"
android {
compileSdkVersion 28
defaultConfig {
useLibrary 'org.apache.http.legacy'
// applicationId "com.hhmedic.android.sdk.base"
minSdkVersion 17
targetSdkVersion 28
versionCode increasedVersionCode()
versionName "${baseVersion}.${buildTime()}"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug{
minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions
{
checkReleaseBuilds false
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
api 'com.google.code.gson:gson:2.8.0'
// implementation 'com.orhanobut:logger:2.2.0'
}
repositories {
mavenCentral()
maven {
credentials {
username 'hh-public'
password 'OFGB5wX0'
}
url 'http://develop.hh-medic.com/repository/maven-public'
}
}
//apply from:'maven-release-aar.gradle'
apply from:'bintray.gradle'
apply from:'install.gradle'