-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
104 lines (89 loc) · 2.97 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
import groovy.json.JsonSlurper
// Top-level build file where you can add configuration options common to all sub-projects/modules.
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProps = new Properties()
if(keystorePropertiesFile.exists()){
keystoreProps.load(new FileInputStream(keystorePropertiesFile))
}
//check unset keystore properties
/*
["GOOGLE_MAPS_API_KEY"].forEach {
key ->
if (!keystoreProps.containsKey(key)) {
keystoreProps.setProperty(key, "null")
}
}*/
//load google-services.json
File googleServicesFile = rootProject.file("google-services.json")
def googleServicesJson = new JsonSlurper().parseText(googleServicesFile.text)
//load buildConfig.json
File buildConfigJsonFile = rootProject.file("omnitrackBuildConfig.json")
def buildConfigs = new JsonSlurper().parseText(buildConfigJsonFile.text)
ext {
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '29.0.0'
minSdkVersion = 19
}
buildscript {
ext.kotlin_version = '1.3.72'
ext.androidx_core_version = '1.2.0'
ext.androidx_appcompat_version = '1.2.0-rc01'
ext.androidx_transition_version = "1.0.1"
ext.androidx_preference_version = "1.1.0"
ext.androidx_material_version = "1.1.0"
ext.androidx_annotation_version = '1.1.0'
ext.androidx_recyclerview_version = '1.1.0'
ext.android_support_version = '1.0.0'
ext.dagger_version = '2.27'
ext.gson_version = '2.8.5'
ext.picasso_version = '2.71828'
ext.rxjava_version = '2.2.12'
ext.rxandroid_version = '2.1.1'
ext.retrofit_version = '2.5.0'
ext.okhttp_version = '3.12.1' // should be fixed if we maintain the minimum SDK 19.
ext.rxactivityresult_version = '0.5.0-2.x'
ext.spinkit_version='1.4.0'
ext.reactive_network_version='3.0.3'
ext.androidx_constraintlayout_version='1.1.3'
ext.gradle_version = '3.5.3'
repositories {
jcenter()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath "io.realm:realm-gradle-plugin:6.0.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.cookpad.android.licensetools:license-tools-plugin:1.4.0'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'kotlin'
allprojects {
repositories {
google()
jcenter()
}
project.ext{
buildConfigJson = buildConfigs
keystoreProperties = keystoreProps
googleServices = googleServicesJson
}
}
/*
task clean(type: Delete) {
delete rootProject.buildDir
}*/
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}