-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
142 lines (117 loc) · 3.32 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java-library'
id 'jacoco'
id "maven-publish"
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version "1.1.0"
}
group 'de.pixel.mcc'
sourceCompatibility = JavaVersion.VERSION_11
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc
}
test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
showStandardStreams true
}
reports {
html.enabled = true
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
signing {
def signingKey = System.getenv('SIGN_KEY')
def signingPassword = System.getenv('SIGN_PASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
publishing {
publications {
mmc(MavenPublication) {
from components.java
groupId project.group
artifactId project.name
version project.version
artifact sourcesJar
artifact javadocJar
pom {
name = project.name
description = 'A testing framework to check for changes in database migration files.'
url = 'https://github.com/PixelGmbH/MigrationChange-Checker'
licenses {
license {
name = 'Apache-2.0 Licence'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
organization {
name = 'Pixel GmbH'
url = 'https://www.pixel.de/'
}
developers {
developer {
id = 'Poeschl'
name = 'Markus Pöschl'
url = 'https://poeschl.xyz/'
}
}
scm {
url = "https://github.com/PixelGmbH/MigrationChange-Checker"
}
}
versionMapping {
allVariants {
fromResolutionResult()
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv('OSSRH_USER')
password = System.getenv('OSSRH_PASSWORD')
}
}
}
repositories {
mavenCentral()
}
dependencies {
api 'commons-codec:commons-codec:1.11'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junit_version"
testImplementation "org.assertj:assertj-core:$assertj_version"
}