-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
121 lines (100 loc) · 3.14 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.1.2-5'
build_tools_version = '26.0.0'
compile_sdk_version = 26
min_sdk_version = 15
target_sdk_version = 25
libraries = [
supportVersion: "25.4.0",
ankoVersion : "0.9.1a",
]
GROUP = "io.vithor.frameworks.yaf"
DEPLOY_TO = System.getenv("DEPLOY_TO") ?: "LOCAL"
}
repositories {
google()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.14"
// classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.7.1-SNAPSHOT'
if (DEPLOY_TO == "BINTRAY") {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
}
plugins {
id 'com.gladed.androidgitversion' version '0.3.4'
}
androidGitVersion {
format = '%tag%'
}
def getVersionName() {
return androidGitVersion.name()
}
ext.VERSION_NAME = getVersionName()
allprojects {
configurations {
javadocDeps
}
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
subprojects {
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.dokka-android'
// make sure this comes *after* you apply the Android plugin
// apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'maven-publish'
if (DEPLOY_TO == "BINTRAY") {
apply plugin: 'com.jfrog.bintray'
}
android {
compileSdkVersion compile_sdk_version
buildToolsVersion "$build_tools_version"
defaultConfig {
minSdkVersion min_sdk_version
targetSdkVersion target_sdk_version
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
warning 'InvalidPackage'
disable 'UnusedResources'
}
}
dependencies {
testImplementation 'junit:junit:4.12'
testImplementation "com.winterbe:expekt:0.5.0"
testImplementation 'com.nhaarman:mockito-kotlin:1.4.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
apply from: new File("${rootProject.projectDir}/publish-base.gradle")
if (DEPLOY_TO == "LOCAL") {
apply from: new File("${rootProject.projectDir}/publish-local.gradle")
} else if (DEPLOY_TO == "BINTRAY") {
apply from: new File("${rootProject.projectDir}/publish-bintray.gradle")
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}