forked from cloudinary/cloudinary_android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
60 lines (48 loc) · 1.63 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
allprojects {
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.1"
classpath 'digital.wup:android-maven-publish:3.6.2'
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
google()
mavenCentral()
}
project.ext.set("publishGroupId", group)
}
ext.loadExtraProperties = { fileName ->
def props = new Properties()
props.load(new FileInputStream(fileName))
props.each { key, val ->
project.ext[key] = val
}
}
ext.getCloudinaryUrl = { ->
return findProperty("cloudinaryUrl") ?: System.getenv('CLOUDINARY_URL') ?: System.getProperty('CLOUDINARY_URL')
}
ext.generateAndLoadLocalGradleProperties = { rootPath ->
// Create default local gradle properties (ignored by git)
def file = new File( 'gradle-local.properties')
if (file.createNewFile()) {
file.text = '# Uncomment and fill in your cloudinary url from cloudinary.com/console. *** IMPORTANT - This should be the url WITHOUT the api secret.\n# cloudinaryUrl=fill_in_your_cloudinary_url'
}
loadExtraProperties file
}
subprojects {
tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors()
testLogging.showStandardStreams = true
}
}
generateAndLoadLocalGradleProperties ''