-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
153 lines (135 loc) · 3.86 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
143
144
145
146
147
148
149
150
151
152
153
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'com.diffplug.spotless' version '6.25.0'
id 'org.jreleaser' version '1.16.0'
id 'application'
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
group 'com.inwx'
version '4.0.0'
allprojects {
repositories {
mavenCentral()
}
project.pluginManager.withPlugin("com.diffplug.spotless") {
spotless {
java {
licenseHeaderFile rootProject.file('extra/licensing/mit-license.java')
removeUnusedImports()
eclipse().configFile rootProject.file('extra/formatting/eclipse-java-google-style.xml')
importOrderFile rootProject.file('extra/formatting/eclipse.importorder')
}
format("misc") {
target("**/*.gradle", "**/*.md", "**/*.yml")
trimTrailingWhitespace()
endWithNewline()
}
}
}
tasks.withType(Jar) {
from(project.rootDir) {
include 'LICENSE'
into 'META-INF'
}
}
}
dependencies {
api 'com.google.code.gson:gson:2.11.0'
implementation 'org.jboss.aerogear:aerogear-otp-java:1.0.0'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
}
tasks.assembleDist.doFirst {
mkdir layout.buildDirectory.dir("jreleaser")
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'INWX Domrobot Java Client'
description = 'INWX Domrobot Java Client'
url = 'https://github.com/inwx/java-client'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
distribution = 'repo'
}
}
developers {
developer {
id = 'developer-inwx'
name = 'INWX Developer'
email = 'developer@inwx.de'
organization = 'INWX GmbH & Co. KG'
organizationUrl = 'https://www.inwx.com/en/'
}
}
scm {
connection = 'scm:git:git://github.com/inwx/java-client.git'
developerConnection = 'scm:git:ssh@github.com:inwx/java-client.git'
url = 'https://github.com/inwx/java-client'
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
jreleaser {
environment {
variables = 'config.yml'
properties.put('JRELEASER_BRANCH', 'master')
}
project {
authors = ['INWX Developer']
license = 'MIT'
links {
homepage = 'https://github.com/inwx/java-client'
}
inceptionYear = '2014'
description = 'INWX Domrobot Java Client'
}
release {
github {
repoOwner = 'inwx'
overwrite = true
}
}
distributions {
app {
distributionType = 'SINGLE_JAR'
artifact {
path = 'build/libs/domrobot-{{projectVersion}}.jar'
}
}
}
signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
mavenCentral {
app {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository('build/staging-deploy')
}
}
}
}
}