|
1 |
| -apply plugin: 'com.android.application' |
2 |
| -//apply plugin: 'kotlin-kapt' // required for kotlin. |
3 |
| - |
4 |
| -def dbflow_version = "4.2.4" |
5 |
| -// or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch |
6 |
| -// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet) |
7 |
| - |
8 |
| - |
9 |
| -ext.readProperty = { paramName -> readPropertyWithDefault(paramName, null) } |
10 |
| -ext.readPropertyWithDefault = { paramName, defaultValue -> |
11 |
| - if (project.hasProperty(paramName)) { |
12 |
| - return project.getProperties().get(paramName) |
13 |
| - } else { |
14 |
| - Properties properties = new Properties() |
15 |
| - if (project.rootProject.file('local.properties').exists()) { |
16 |
| - properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
17 |
| - } |
18 |
| - if (properties.getProperty(paramName) != null) { |
19 |
| - return properties.getProperty(paramName) |
20 |
| - } else { |
21 |
| - return defaultValue |
22 |
| - } |
23 |
| - } |
24 |
| -} |
25 |
| - |
26 |
| -// Try reading secrets from file |
27 |
| -def secretsPropertiesFile = rootProject.file("secrets.properties") |
28 |
| -def secretProperties = new Properties() |
29 |
| - |
30 |
| -if (secretsPropertiesFile.exists()) { |
31 |
| - secretProperties.load(new FileInputStream(secretsPropertiesFile)) |
32 |
| -} |
33 |
| -// Otherwise read from environment variables, this happens in CI |
34 |
| -else { |
35 |
| - secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}") |
36 |
| - secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}") |
37 |
| - secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}") |
38 |
| -} |
39 |
| - |
40 |
| -repositories { |
41 |
| - maven { |
42 |
| - url 'https://maven.google.com/' |
43 |
| - name 'Google' |
44 |
| - } |
45 |
| -} |
46 |
| - |
47 |
| -android { |
48 |
| - compileSdkVersion 29 |
49 |
| - buildToolsVersion '29.0.3' |
50 |
| - |
51 |
| - useLibrary 'android.test.runner' |
52 |
| - useLibrary 'android.test.base' |
53 |
| - useLibrary 'android.test.mock' |
54 |
| - |
55 |
| - defaultConfig { |
56 |
| - applicationId "net.schueller.instarepost" |
57 |
| - minSdkVersion 19 |
58 |
| - targetSdkVersion 29 |
59 |
| - versionCode Integer.valueOf(System.env.VERSION_CODE ?: 1) |
60 |
| - versionName "${System.env.VERSION_NAME}-${System.env.VERSION_SHA}" |
61 |
| - buildConfigField "long", "BUILD_TIME", readPropertyWithDefault('buildTimestamp', System.currentTimeMillis()) + 'L' |
62 |
| - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
63 |
| - } |
64 |
| - |
65 |
| - signingConfigs { |
66 |
| - release { |
67 |
| - // You need to specify either an absolute path or include the |
68 |
| - // keystore file in the same directory as the build.gradle file. |
69 |
| - storeFile file("../android-signing-keystore.jks") |
70 |
| - storePassword "${secretProperties['signing_keystore_password']}" |
71 |
| - keyAlias "${secretProperties['signing_key_alias']}" |
72 |
| - keyPassword "${secretProperties['signing_key_password']}" |
73 |
| - } |
74 |
| - } |
75 |
| - buildTypes { |
76 |
| - release { |
77 |
| - minifyEnabled false |
78 |
| - testCoverageEnabled false |
79 |
| - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
80 |
| - signingConfig signingConfigs.release |
81 |
| - } |
82 |
| - } |
83 |
| - compileOptions { |
84 |
| - sourceCompatibility JavaVersion.VERSION_1_8 |
85 |
| - targetCompatibility JavaVersion.VERSION_1_8 |
86 |
| - } |
87 |
| - applicationVariants.all { variant -> |
88 |
| - variant.resValue "string", "versionName", variant.versionName |
89 |
| - } |
90 |
| - testOptions { |
91 |
| - unitTests { |
92 |
| - includeAndroidResources = true |
93 |
| - } |
94 |
| - } |
95 |
| -} |
96 |
| - |
97 |
| -dependencies { |
98 |
| - implementation 'androidx.preference:preference:1.1.1' |
99 |
| - |
100 |
| - // if Java use this. If using Kotlin do NOT use this. |
101 |
| - annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}" |
102 |
| - |
103 |
| - // use kapt for kotlin apt |
104 |
| - implementation "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}" |
105 |
| - implementation "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}" |
106 |
| - |
107 |
| - // kotlin extensions |
108 |
| - implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${dbflow_version}" |
109 |
| - |
110 |
| - implementation fileTree(include: ['*.jar'], dir: 'libs') |
111 |
| - |
112 |
| - |
113 |
| - implementation 'androidx.legacy:legacy-support-v4:1.0.0' |
114 |
| - implementation 'androidx.appcompat:appcompat:1.1.0' |
115 |
| - implementation 'com.github.sschueller:android-ClipboardManagerCompat:-SNAPSHOT' |
116 |
| - implementation 'org.jsoup:jsoup:1.13.1' |
117 |
| - implementation 'androidx.cardview:cardview:1.0.0' |
118 |
| - implementation 'androidx.recyclerview:recyclerview:1.1.0' |
119 |
| - implementation 'com.google.code.gson:gson:2.8.6' |
120 |
| - implementation 'com.squareup.picasso:picasso:2.5.2' |
121 |
| - implementation 'com.github.paolorotolo:appintro:4.1.0' |
122 |
| - implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2' // (v4.5) |
123 |
| - implementation('com.squareup.okhttp3:okhttp:4.8.0') |
124 |
| - |
125 |
| - // Testing-only dependencies |
126 |
| - testImplementation 'junit:junit:4.13' |
127 |
| - |
128 |
| - // Core library |
129 |
| - androidTestImplementation 'androidx.test:core:1.2.0' |
130 |
| - |
131 |
| - // AndroidJUnitRunner and JUnit Rules |
132 |
| - androidTestImplementation 'androidx.test:runner:1.2.0' |
133 |
| - androidTestImplementation 'androidx.test:rules:1.2.0' |
134 |
| - |
135 |
| - // Assertions |
136 |
| - androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
137 |
| - androidTestImplementation 'androidx.test.ext:truth:1.2.0' |
138 |
| - androidTestImplementation 'com.google.truth:truth:1.0.1' |
139 |
| - |
140 |
| - // Espresso dependencies |
141 |
| - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
142 |
| - androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0' |
143 |
| - androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0' |
144 |
| - androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.2.0' |
145 |
| - androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0' |
146 |
| - androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.2.0' |
147 |
| - |
148 |
| - // The following Espresso dependency can be either "implementation" |
149 |
| - // or "androidTestImplementation", depending on whether you want the |
150 |
| - // dependency to appear on your APK's compile classpath or the test APK |
151 |
| - // classpath. |
152 |
| - androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.2.0' |
153 |
| - |
154 |
| - testImplementation 'androidx.test:core:1.2.0' |
155 |
| - testImplementation 'androidx.test.ext:junit:1.1.1' |
156 |
| - testImplementation 'org.robolectric:robolectric:4.3.1' |
157 |
| - testImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
158 |
| - testImplementation 'androidx.test.espresso:espresso-intents:3.2.0' |
159 |
| - testImplementation 'androidx.test.ext:truth:1.2.0' |
160 |
| - |
161 |
| -} |
| 1 | +apply plugin: 'com.android.application' |
| 2 | +//apply plugin: 'kotlin-kapt' // required for kotlin. |
| 3 | + |
| 4 | +def dbflow_version = "4.2.4" |
| 5 | +// or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch |
| 6 | +// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet) |
| 7 | + |
| 8 | + |
| 9 | +ext.readProperty = { paramName -> readPropertyWithDefault(paramName, null) } |
| 10 | +ext.readPropertyWithDefault = { paramName, defaultValue -> |
| 11 | + if (project.hasProperty(paramName)) { |
| 12 | + return project.getProperties().get(paramName) |
| 13 | + } else { |
| 14 | + Properties properties = new Properties() |
| 15 | + if (project.rootProject.file('local.properties').exists()) { |
| 16 | + properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
| 17 | + } |
| 18 | + if (properties.getProperty(paramName) != null) { |
| 19 | + return properties.getProperty(paramName) |
| 20 | + } else { |
| 21 | + return defaultValue |
| 22 | + } |
| 23 | + } |
| 24 | +} |
| 25 | + |
| 26 | +// Try reading secrets from file |
| 27 | +def secretsPropertiesFile = rootProject.file("secrets.properties") |
| 28 | +def secretProperties = new Properties() |
| 29 | + |
| 30 | +if (secretsPropertiesFile.exists()) { |
| 31 | + secretProperties.load(new FileInputStream(secretsPropertiesFile)) |
| 32 | +} |
| 33 | +// Otherwise read from environment variables, this happens in CI |
| 34 | +else { |
| 35 | + secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}") |
| 36 | + secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}") |
| 37 | + secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}") |
| 38 | +} |
| 39 | + |
| 40 | +repositories { |
| 41 | + maven { |
| 42 | + url 'https://maven.google.com/' |
| 43 | + name 'Google' |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +android { |
| 48 | + compileSdkVersion 29 |
| 49 | + buildToolsVersion '29.0.3' |
| 50 | + |
| 51 | + useLibrary 'android.test.runner' |
| 52 | + useLibrary 'android.test.base' |
| 53 | + useLibrary 'android.test.mock' |
| 54 | + |
| 55 | + defaultConfig { |
| 56 | + applicationId "net.schueller.instarepost" |
| 57 | + minSdkVersion 19 |
| 58 | + targetSdkVersion 29 |
| 59 | + versionCode Integer.valueOf(System.getenv("VERSION_CODE") ?: 1) |
| 60 | + versionName System.getenv("VERSION_NAME") + "-" + System.getenv("VERSION_SHA") // "${System.env.VERSION_NAME}-${System.env.VERSION_SHA}" |
| 61 | + buildConfigField "long", "BUILD_TIME", readPropertyWithDefault('buildTimestamp', System.currentTimeMillis()) + 'L' |
| 62 | + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 63 | + } |
| 64 | + |
| 65 | + signingConfigs { |
| 66 | + release { |
| 67 | + // You need to specify either an absolute path or include the |
| 68 | + // keystore file in the same directory as the build.gradle file. |
| 69 | + storeFile file("../android-signing-keystore.jks") |
| 70 | + storePassword "${secretProperties['signing_keystore_password']}" |
| 71 | + keyAlias "${secretProperties['signing_key_alias']}" |
| 72 | + keyPassword "${secretProperties['signing_key_password']}" |
| 73 | + } |
| 74 | + } |
| 75 | + buildTypes { |
| 76 | + release { |
| 77 | + minifyEnabled false |
| 78 | + testCoverageEnabled false |
| 79 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 80 | + signingConfig signingConfigs.release |
| 81 | + } |
| 82 | + } |
| 83 | + compileOptions { |
| 84 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 85 | + targetCompatibility JavaVersion.VERSION_1_8 |
| 86 | + } |
| 87 | + applicationVariants.all { variant -> |
| 88 | + variant.resValue "string", "versionName", variant.versionName |
| 89 | + } |
| 90 | + testOptions { |
| 91 | + unitTests { |
| 92 | + includeAndroidResources = true |
| 93 | + } |
| 94 | + } |
| 95 | +} |
| 96 | + |
| 97 | +dependencies { |
| 98 | + implementation 'androidx.preference:preference:1.1.1' |
| 99 | + |
| 100 | + // if Java use this. If using Kotlin do NOT use this. |
| 101 | + annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}" |
| 102 | + |
| 103 | + // use kapt for kotlin apt |
| 104 | + implementation "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}" |
| 105 | + implementation "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}" |
| 106 | + |
| 107 | + // kotlin extensions |
| 108 | + implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${dbflow_version}" |
| 109 | + |
| 110 | + implementation fileTree(include: ['*.jar'], dir: 'libs') |
| 111 | + |
| 112 | + |
| 113 | + implementation 'androidx.legacy:legacy-support-v4:1.0.0' |
| 114 | + implementation 'androidx.appcompat:appcompat:1.1.0' |
| 115 | + implementation 'com.github.sschueller:android-ClipboardManagerCompat:-SNAPSHOT' |
| 116 | + implementation 'org.jsoup:jsoup:1.13.1' |
| 117 | + implementation 'androidx.cardview:cardview:1.0.0' |
| 118 | + implementation 'androidx.recyclerview:recyclerview:1.1.0' |
| 119 | + implementation 'com.google.code.gson:gson:2.8.6' |
| 120 | + implementation 'com.squareup.picasso:picasso:2.5.2' |
| 121 | + implementation 'com.github.paolorotolo:appintro:4.1.0' |
| 122 | + implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2' // (v4.5) |
| 123 | + implementation('com.squareup.okhttp3:okhttp:4.8.0') |
| 124 | + |
| 125 | + // Testing-only dependencies |
| 126 | + testImplementation 'junit:junit:4.13' |
| 127 | + |
| 128 | + // Core library |
| 129 | + androidTestImplementation 'androidx.test:core:1.2.0' |
| 130 | + |
| 131 | + // AndroidJUnitRunner and JUnit Rules |
| 132 | + androidTestImplementation 'androidx.test:runner:1.2.0' |
| 133 | + androidTestImplementation 'androidx.test:rules:1.2.0' |
| 134 | + |
| 135 | + // Assertions |
| 136 | + androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
| 137 | + androidTestImplementation 'androidx.test.ext:truth:1.2.0' |
| 138 | + androidTestImplementation 'com.google.truth:truth:1.0.1' |
| 139 | + |
| 140 | + // Espresso dependencies |
| 141 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| 142 | + androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0' |
| 143 | + androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0' |
| 144 | + androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.2.0' |
| 145 | + androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0' |
| 146 | + androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.2.0' |
| 147 | + |
| 148 | + // The following Espresso dependency can be either "implementation" |
| 149 | + // or "androidTestImplementation", depending on whether you want the |
| 150 | + // dependency to appear on your APK's compile classpath or the test APK |
| 151 | + // classpath. |
| 152 | + androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.2.0' |
| 153 | + |
| 154 | + testImplementation 'androidx.test:core:1.2.0' |
| 155 | + testImplementation 'androidx.test.ext:junit:1.1.1' |
| 156 | + testImplementation 'org.robolectric:robolectric:4.3.1' |
| 157 | + testImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| 158 | + testImplementation 'androidx.test.espresso:espresso-intents:3.2.0' |
| 159 | + testImplementation 'androidx.test.ext:truth:1.2.0' |
| 160 | + |
| 161 | +} |
0 commit comments