forked from greenrobot/greenDAO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (88 loc) · 3.5 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
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
ext {
buildToolsVersion = '23.0.3'
compileSdkVersion = 23
minSdkVersion = 7
targetSdkVersion = 23
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
subprojects {
apply plugin: 'maven'
apply plugin: 'signing'
repositories {
mavenCentral()
jcenter()
}
configurations {
deployerJars
}
dependencies {
deployerJars 'org.apache.maven.wagon:wagon-webdav:1.0-beta-2'
}
signing {
if (project.hasProperty('signing.keyId') && project.hasProperty('signing.password') &&
project.hasProperty('signing.secretKeyRingFile')) {
sign configurations.archives
} else {
println "Signing information missing/incomplete for ${project.name}"
}
}
// Use afterEvaluate or all dependencies will be lost in the generated POM
afterEvaluate {
uploadArchives {
repositories {
mavenDeployer {
def isSnapshot = version.endsWith('-SNAPSHOT')
def sonatypeRepositoryUrl = isSnapshot ?
"https://oss.sonatype.org/content/repositories/snapshots/"
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
if (project.hasProperty('preferedRepo') && project.hasProperty('preferedUsername')
&& project.hasProperty('preferedPassword')) {
configuration = configurations.deployerJars
repository(url: preferedRepo) {
authentication(userName: preferedUsername, password: preferedPassword)
}
} else if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: sonatypeRepositoryUrl) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
} else {
println "Settings sonatypeUsername/sonatypePassword missing/incomplete for ${project.name}"
}
pom.project {
packaging 'jar'
url 'http://greenrobot.org/greendao'
scm {
url 'https://github.com/greenrobot/greenDAO'
connection 'scm:[email protected]:greenrobot/greenDAO.git'
developerConnection 'scm:[email protected]:greenrobot/greenDAO.git'
}
developers {
developer {
id 'greenrobot'
name 'greenrobot'
}
}
issueManagement {
system 'GitHub Issues'
url 'https://github.com/greenrobot/greenDAO/issues'
}
organization {
name 'greenrobot'
url 'http://greenrobot.org'
}
}
}
}
}
}
}