-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (90 loc) · 3.04 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
minSdkVersion = 15
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
kotlinVersion = '1.3.21'
IS_UPLOADING = project.getGradle().startParameter.taskNames.any{it.contains('generatePomFileForReleasePublication')}
}
ext.deps = [
junit : 'junit:junit:4.12',
festassert : 'org.easytesting:fest-assert-core:2.0M10',
robolectric: 'org.robolectric:robolectric:3.0',
lint: [
'core': "com.android.tools.lint:lint:26.4.0",
'api': "com.android.tools.lint:lint-api:26.4.0",
'checks': "com.android.tools.lint:lint-checks:26.4.0",
'tests': "com.android.tools.lint:lint-tests:26.4.0",
],
]
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.novoda:bintray-release:0.8.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
subprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}
group = GROUP
version = VERSION_NAME
allprojects {
repositories {
jcenter()
}
if (IS_UPLOADING && project.name in ['library']) {
println project.name
println GROUP
println VERSION_NAME
apply plugin: 'maven'
gradle.taskGraph.whenReady { taskGraph ->
taskGraph.getAllTasks().find {
it.path == ":$project.name:generatePomFileForReleasePublication"
}.doLast {
println "delete pom"
file("build/publications/release/pom-default.xml").delete()
println "pom"
pom {
project {
name "logger"
groupId GROUP
artifactId POM_ARTIFACT_ID
packaging 'aar'
description POM_DESCRIPTION
url POM_URL
version VERSION_NAME
scm {
url POM_SCM_URL
connection POM_URL
developerConnection POM_URL
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
}
}
developers {
developer {
id POM_DEVELOPER_ID
email POM_DEVELOPER_EMAIL
}
}
}
}.writeTo("build/publications/release/pom-default.xml")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}