-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
125 lines (100 loc) · 2.74 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
116
117
118
119
120
121
122
123
124
125
plugins {
id 'java'
id "io.codearte.nexus-staging" version "0.20.0"
id "de.marcphilipp.nexus-publish" version "0.2.0"
}
nexusStaging {
packageGroup = 'com.mageddo'
username = project.findProperty("ossrhUsername")
password = project.findProperty("ossrhPassword")
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: "de.marcphilipp.nexus-publish"
repositories {
mavenLocal()
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
artifact sourcesJar
artifact javadocJar
pom {
name = project.name
packaging = 'jar'
description = project.description
url = "${githubRepoUrl}/tree/master/" + project.name
scm {
connection = "${githubRepoUrl}.git"
developerConnection = "${githubRepoUrl}.git"
url = "${githubRepoUrl}/tree/master/" + project.name
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'mageddo'
name = 'Elvis Souza'
email = 'edigitalb@gmail.com'
}
}
}
}
}
}
if (project.hasProperty("signing.keyId")) {
apply plugin: 'signing'
signing {
sign publishing.publications.mavenJava
}
}
}
project(":toggle-first-core") {
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.6'
compile group: 'com.mageddo', name: 'commons', version: '1.2.0'
compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter', version: '2.0.4.RELEASE'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.27.0'
}
}
project(":toggle-first-repo-jdbc") {
dependencies {
compile(project(':toggle-first-core'))
compile group: 'org.flywaydb', name: 'flyway-core', version: '5.2.4'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.hsqldb', name: 'hsqldb', version: '2.4.1'
}
}
task version(){
println(project.version)
}