-
Notifications
You must be signed in to change notification settings - Fork 57
/
build.gradle
109 lines (95 loc) · 3.21 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
105
106
107
108
109
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
repositories {
jcenter()
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:$support_library_version"
compile "com.android.support:design:$support_library_version"
}
publish {
groupId = 'com.github.chyrta'
artifactId = 'AndroidOnboarder'
publishVersion = '0.8'
desc = 'A light-weight library to create beauty onboarding experience in Material Design'
licences = ['MIT']
website = 'https://github.com/chyrta/AndroidOnboarder'
}
ext {
ARTIFACT_ID = 'AndroidOnboarder'
VERSION_NAME = '0.8'
VERSION_CODE = 7
DESCRIPTION = 'A light-weight library to create beauty onboarding experience in Material Design'
SITE_URL = 'https://github.com/chyrta'
GIT_URL = 'https://github.com/chyrta/AndroidOnboarder'
GROUP_NAME = 'com.github.chyrta'
MODULE_NAME = 'onboarder'
COMPILE_SDK = 26
BUILD_TOOLS = '26.0.1'
LICENSE = 'MIT'
IS_UPLOADING = project.getGradle().startParameter.taskNames.any{it.contains('bintrayUpload')}
}
subprojects {
group = GROUP_NAME
version = VERSION_CODE
if (IS_UPLOADING && project.name in [MODULE_NAME]) {
println project.name
apply plugin: 'maven'
gradle.taskGraph.whenReady { taskGraph ->
taskGraph.getAllTasks().find {
it.path == ":$project.name:generatePomFileForMavenPublication"
}.doLast {
file("build/publications/maven/pom-default.xml").delete()
println 'Overriding pom-file to make sure we can sync to maven central!'
pom {
//noinspection GroovyAssignabilityCheck
project {
name "$project.name"
artifactId ARTIFACT_ID
packaging project.name == 'compiler' ? 'jar' : 'aar'
description DESCRIPTION
url SITE_URL
version VERSION_NAME
scm {
url GIT_URL
connection GIT_URL
developerConnection GIT_URL
}
licenses {
license {
name LICENSE
}
}
developers {
developer {
id 'chyrta'
name 'Dzmitry Chyrta'
email 'dima@chyrta.com'
}
}
}
}.writeTo("build/publications/maven/pom-default.xml")
}
}
}
}