1
+ import com.vanniktech.maven.publish.SonatypeHost
1
2
2
3
plugins {
3
4
id ' java'
4
- id ' maven-publish'
5
- id ' signing'
6
5
id ' checkstyle'
6
+ id ' com.vanniktech.maven.publish' version ' 0.32.0'
7
7
id ' com.diffplug.spotless' version ' 7.0.3'
8
8
id ' com.github.spotbugs' version ' 6.1.11'
9
9
id ' com.github.ben-manes.versions' version ' 0.52.0'
@@ -23,12 +23,12 @@ spotless {
23
23
}
24
24
25
25
spotbugsMain {
26
- reports {
27
- html {
28
- enabled = true
26
+ reports {
27
+ html {
28
+ required. set(true )
29
+ }
29
30
}
30
- }
31
- }
31
+ }
32
32
33
33
checkstyle {
34
34
toolVersion = ' 10.12.1'
@@ -43,42 +43,14 @@ checkstyleMain.dependsOn spotlessApply
43
43
repositories {
44
44
mavenLocal()
45
45
mavenCentral()
46
- maven {
47
- url " https://oss.sonatype.org/content/repositories/snapshots/"
48
- }
49
- }
50
-
51
- check {
52
- dependsOn(tasks. publishToMavenLocal)
53
46
}
54
47
55
48
java {
56
- withJavadocJar()
57
- withSourcesJar()
58
-
59
49
toolchain {
60
50
languageVersion. set(JavaLanguageVersion . of(17 ))
61
51
}
62
52
}
63
53
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
-
82
54
dependencies {
83
55
implementation group : ' com.amazonaws' , name : ' aws-lambda-java-core' , version : ' 1.2.3'
84
56
implementation group : ' com.google.code.gson' , name : ' gson' , version : ' 2.13.1'
@@ -90,57 +62,39 @@ dependencies {
90
62
testImplementation group : ' org.slf4j' , name : ' slf4j-simple' , version : ' 2.0.17'
91
63
}
92
64
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 {
135
66
136
- signing {
137
- sign publishing. publications. mavenJava
138
- }
67
+ publishToMavenCentral(SonatypeHost . CENTRAL_PORTAL )
139
68
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
+ }
142
93
}
143
94
95
+ compileJava. dependsOn(tasks. spotlessApply)
96
+ check. dependsOn(tasks. publishToMavenLocal)
97
+
144
98
test {
145
99
failFast = true
146
100
useJUnitPlatform()
0 commit comments