forked from DroidPlanner/Tower
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
79 lines (62 loc) · 2.17 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.0.0'
play_services_version = '9.4.0'
support_lib_version = '23.4.0'
okhttp_version = '2.5.0'
android_build_sdk_version = 23
android_build_tools_version = '23.0.3'
android_build_target_sdk_version = 22
android_build_min_sdk_version = 14
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'io.fabric.tools:gradle:1.21.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//Dexcount gradle plugin
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.4.4'
}
}
def getMavenUsername(){
return hasProperty('COM_O3DR_MAVEN_USERNAME') ? COM_O3DR_MAVEN_USERNAME : ''
}
def getMavenApiKey(){
return hasProperty('COM_O3DR_MAVEN_APIKEY') ? COM_O3DR_MAVEN_APIKEY : ''
}
def getMavenRepoUrl(){
return hasProperty('COM_O3DR_MAVEN_REPO_URL') ? COM_O3DR_MAVEN_REPO_URL :
'https://dl.bintray.com/3d-robotics/maven'
}
def computeVersionCode(int versionMajor, int versionMinor, int versionPatch, int versionBuild = 0){
return versionMajor * 100000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
}
def generateVersionName(String versionPrefix, int versionMajor, int versionMinor, int versionPatch, String versionSuffix = ""){
def versionName = "${versionPrefix}${versionMajor}.${versionMinor}.${versionPatch}"
if(versionSuffix != null && !versionSuffix.isEmpty() && versionSuffix != "release"){
versionName += "-${versionSuffix}"
}
return versionName
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url getMavenRepoUrl()
credentials {
username getMavenUsername()
password getMavenApiKey()
}
}
maven { url 'https://maven.fabric.io/public' }
flatDir {
dirs 'libs'
}
}
}