forked from greenrobot/greenDAO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (95 loc) · 3.84 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
110
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
ext {
buildToolsVersion = '25.0.0'
compileSdkVersion = 25
minSdkVersion = 7
targetSdkVersion = 25
// common dependencies for Android projects
dep = [
androidPlugin: 'com.android.tools.build:gradle:2.2.2',
greendaoPlugin: 'org.greenrobot:greendao-gradle-plugin:3.1.1',
appcompat: 'com.android.support:appcompat-v7:25.0.0',
recyclerview: 'com.android.support:recyclerview-v7:25.0.0'
]
}
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'
}
}
}
}
}
}
}