This repository has been archived by the owner on Feb 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
89 lines (72 loc) · 2.31 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
apply plugin: 'com.saantiaguilera.gradle.publish.helper'
buildscript {
repositories {
jcenter()
// Until its added to jcenter
maven {
url 'https://dl.bintray.com/saantiaguilera/maven/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath "com.saantiaguilera.gradle.publish.helper:core:2.0.2"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
wrapper {
version = '3.5'
distributionType = Wrapper.DistributionType.ALL
}
publishGlobalConfigurations {
groupId = groupName
versionName = libraryVersion
url = "https://github.com/saantiaguilera/android-api-graph_flow"
bintrayUser = System.getenv('BINTRAY_USER')
bintrayApiKey = System.getenv('BINTRAY_KEY')
licenseUrl = "http://www.gnu.org/licenses/gpl-3.0.html"
licenseName = "GPL-3.0"
publishOrder = [ 'core', 'fragments', 'views', 'conductor' ]
}
ext.isForPublish = (System.getenv('CI') &&
System.getenv('TRAVIS_BRANCH') == "master" &&
System.getenv('CI_PUBLISHING') &&
System.getenv(('TRAVIS_PULL_REQUEST')) == "false")
task shouldPublish() {
doLast {
if (!isForPublish) {
println "ci? ${System.getenv('CI')}"
println "travis_branch? ${System.getenv('TRAVIS_BRANCH')}"
println "ci_publishing? ${System.getenv('CI_PUBLISHING')}"
println "travis_pull_request? ${System.getenv('TRAVIS_PULL_REQUEST')}"
throw new GradleException('Dont publish. You cant like this.')
}
}
}
apply from: 'dependencies.gradle'
configure(subprojects.findAll { it.name != 'testapp' }) {
apply plugin:'com.android.library'
android {
compileSdkVersion project.targetSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
defaultConfig {
targetSdkVersion project.targetSdkVersion
consumerProguardFiles 'proguard-rules.pro'
versionName = libraryVersion
}
}
dependencies {
testCompile test.junit
}
}
task clean(type:Delete) {
delete rootProject.buildDir
}