forked from icon-project/javaee-annotation-processor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
115 lines (104 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
103
104
105
106
107
108
109
110
111
112
113
114
115
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'foundation.icon:gradle-javaee-plugin:0.7.8'
}
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
}
apply plugin: 'java'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
ext {
javapoetVersion = getProperty("javapoet.version")
javaeeVersion = getProperty("javaee.version")
scorexVersion = getProperty("scorex.version")
javaeeUnittestVersion = getProperty("javaee-unittest.version")
iconsdkVersion = getProperty("iconsdk.version")
jacksonVersion = getProperty("jackson.version")
okhttpVersion = getProperty("okhttp.version")
integrationTest = Boolean.parseBoolean(getProperty("integrationTest").toString())
}
}
configure([
project(':annotation_processor'),
project(':score-json'),
project(':score-data'),
project(':score-client'),
]) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier 'javadoc'
from javadoc.destinationDir
}
group = getProperty("group")
version = getProperty(project.name+".version") + (rootProject.hasProperty('release') ? '' : '-SNAPSHOT')
def projectName = 'javaee-'+ project.name.replaceAll("_","-")
def repoUrl = 'https://github.com/icon-project/javaee-annotation-processor'
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "iconfoundation"
name "icon.foundation"
email "[email protected]"
}
}
scm {
url repoUrl
}
}
publishing {
repositories {
maven {
name = 'mavenCentral'
def releasesUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsUrl : releasesUrl
credentials {
username = rootProject.hasProperty('mavenCentralUsername') ? "$mavenCentralUsername" : ''
password = rootProject.hasProperty('mavenCentralPassword') ? "$mavenCentralPassword" : ''
}
}
}
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = projectName
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('name', projectName)
root.appendNode('description', 'An Annotation Processor for Java SCORE')
root.appendNode('url', repoUrl)
root.children().last() + pomConfig
}
}
}
}
signing {
required rootProject.hasProperty('release')
sign publishing.publications.mavenJava
}
}