Skip to content

Commit e0c3551

Browse files
committed
Migrated from OSSRH to Central Portal
1 parent 59e6870 commit e0c3551

File tree

1 file changed

+36
-82
lines changed

1 file changed

+36
-82
lines changed

build.gradle

Lines changed: 36 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
12

23
plugins {
34
id 'java'
4-
id 'maven-publish'
5-
id 'signing'
65
id 'checkstyle'
6+
id 'com.vanniktech.maven.publish' version '0.32.0'
77
id 'com.diffplug.spotless' version '7.0.3'
88
id 'com.github.spotbugs' version '6.1.11'
99
id 'com.github.ben-manes.versions' version '0.52.0'
@@ -23,12 +23,12 @@ spotless {
2323
}
2424

2525
spotbugsMain {
26-
reports {
27-
html {
28-
enabled = true
26+
reports {
27+
html {
28+
required.set(true)
29+
}
2930
}
30-
}
31-
}
31+
}
3232

3333
checkstyle {
3434
toolVersion = '10.12.1'
@@ -43,42 +43,14 @@ checkstyleMain.dependsOn spotlessApply
4343
repositories {
4444
mavenLocal()
4545
mavenCentral()
46-
maven {
47-
url "https://oss.sonatype.org/content/repositories/snapshots/"
48-
}
49-
}
50-
51-
check {
52-
dependsOn(tasks.publishToMavenLocal)
5346
}
5447

5548
java {
56-
withJavadocJar()
57-
withSourcesJar()
58-
5949
toolchain {
6050
languageVersion.set(JavaLanguageVersion.of(17))
6151
}
6252
}
6353

64-
javadoc {
65-
if(JavaVersion.current().isJava9Compatible()) {
66-
options.addBooleanOption('html5', true)
67-
}
68-
}
69-
70-
artifacts {
71-
archives jar
72-
73-
archives javadocJar
74-
archives sourcesJar
75-
}
76-
77-
afterEvaluate {
78-
tasks.getByName('spotlessCheck').dependsOn(tasks.getByName('spotlessApply'))
79-
}
80-
81-
8254
dependencies {
8355
implementation group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.2.3'
8456
implementation group: 'com.google.code.gson', name: 'gson', version: '2.13.1'
@@ -90,57 +62,39 @@ dependencies {
9062
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.17'
9163
}
9264

93-
publishing {
94-
publications {
95-
mavenJava(MavenPublication) {
96-
artifactId = 'lambda-runtime-graalvm'
97-
from components.java
98-
99-
pom {
100-
name = 'FormKiQ Lambda Runtime Graalvm'
101-
description = 'Lambda Runtime Graalvm'
102-
url = 'https://github.com/formkiq/lambda-runtime-graalvm'
103-
licenses {
104-
license {
105-
name = 'The Apache License, Version 2.0'
106-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
107-
}
108-
}
109-
developers {
110-
developer {
111-
id = 'mfriesen'
112-
name = 'Mike Friesen'
113-
114-
}
115-
}
116-
scm {
117-
connection = 'scm:git:git://github.com/formkiq/lambda-runtime-graalvm.git'
118-
developerConnection = 'scm:git:ssh://github.com/formkiq/lambda-runtime-graalvm.git'
119-
url = 'https://github.com/formkiq/lambda-runtime-graalvm.git'
120-
}
121-
}
122-
}
123-
}
124-
repositories {
125-
maven {
126-
credentials {
127-
username project.repoUser
128-
password project.repoPassword
129-
}
130-
// url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
131-
url "https://oss.sonatype.org/content/repositories/snapshots/"
132-
}
133-
}
134-
}
65+
mavenPublishing {
13566

136-
signing {
137-
sign publishing.publications.mavenJava
138-
}
67+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
13968

140-
check {
141-
dependsOn(tasks.publishToMavenLocal)
69+
pom {
70+
name = "FormKiQ Lambda Runtime Graalvm"
71+
description = "Lambda Runtime Graalvm"
72+
inceptionYear = "2020"
73+
url = "https://github.com/formkiq/lambda-runtime-graalvm"
74+
licenses {
75+
license {
76+
name = "The Apache License, Version 2.0"
77+
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
78+
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
79+
}
80+
}
81+
developers {
82+
developer {
83+
id = 'mfriesen'
84+
name = 'Mike Friesen'
85+
}
86+
}
87+
scm {
88+
url = 'https://github.com/formkiq/lambda-runtime-graalvm.git'
89+
connection = 'scm:git:git://github.com/formkiq/lambda-runtime-graalvm.git'
90+
developerConnection = 'scm:git:ssh://github.com/formkiq/lambda-runtime-graalvm.git'
91+
}
92+
}
14293
}
14394

95+
compileJava.dependsOn(tasks.spotlessApply)
96+
check.dependsOn(tasks.publishToMavenLocal)
97+
14498
test {
14599
failFast = true
146100
useJUnitPlatform()

0 commit comments

Comments
 (0)