Skip to content

Commit 732b104

Browse files
committed
update
1 parent b8f3676 commit 732b104

1 file changed

Lines changed: 33 additions & 72 deletions

File tree

build.gradle

Lines changed: 33 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
13
plugins {
24
id 'java'
3-
id 'maven-publish'
4-
id 'signing'
5+
id 'com.vanniktech.maven.publish' version '0.32.0'
56
id 'com.diffplug.spotless' version '6.12.0'
67
id 'com.github.ben-manes.versions' version '0.44.0'
78
}
@@ -43,81 +44,41 @@ dependencies {
4344
}
4445

4546
java {
46-
withJavadocJar()
47-
withSourcesJar()
47+
toolchain {
48+
languageVersion.set(JavaLanguageVersion.of(11))
49+
}
4850
}
4951

50-
publishing {
51-
publications {
52-
mavenJava(MavenPublication) {
53-
artifactId = 'client'
54-
from components.java
55-
56-
pom {
57-
name = 'FormKiQ Client'
58-
description = 'The Official Client library for FormKiQ'
59-
url = 'https://github.com/formkiq/formkiq-java-client'
60-
licenses {
61-
license {
62-
name = 'The Apache License, Version 2.0'
63-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
64-
}
65-
}
66-
developers {
67-
developer {
68-
id = 'mfriesen'
69-
name = 'Mike Friesen'
70-
email = 'mike@formkiq.com'
71-
}
72-
}
73-
scm {
74-
connection = 'scm:git:git://github.com/formkiq/formkiq-java-client.git'
75-
developerConnection = 'scm:git:ssh://github.com/formkiq/formkiq-java-client.git'
76-
url = 'https://github.com/formkiq/formkiq-java-client.git'
77-
}
52+
mavenPublishing {
53+
54+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
55+
signAllPublications()
56+
57+
pom {
58+
name = "FormKiQ Client"
59+
description = "The Official Client library for FormKiQ"
60+
inceptionYear = "2020"
61+
url = "https://github.com/formkiq/formkiq-java-client"
62+
licenses {
63+
license {
64+
name = "The Apache License, Version 2.0"
65+
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
66+
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
7867
}
7968
}
80-
}
81-
repositories {
82-
maven {
83-
credentials {
84-
username project.repoUser
85-
password project.repoPassword
86-
// username project.githubUser
87-
// password project.githubToken
88-
}
89-
// maven central
90-
//url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
91-
url "https://oss.sonatype.org/content/repositories/snapshots/"
92-
93-
// github packages
94-
//url "https://maven.pkg.github.com/formkiq/formkiq-client-sdk-java"
69+
developers {
70+
developer {
71+
id = 'mfriesen'
72+
name = 'Mike Friesen'
73+
}
74+
}
75+
scm {
76+
url = 'https://github.com/formkiq/formkiq-java-client.git'
77+
connection = 'scm:git:git://github.com/formkiq/formkiq-java-client.git'
78+
developerConnection = 'scm:git:ssh://github.com/formkiq/formkiq-java-client.git'
9579
}
9680
}
9781
}
9882

99-
javadoc {
100-
if(JavaVersion.current().isJava9Compatible()) {
101-
options.addBooleanOption('html5', true)
102-
}
103-
if(JavaVersion.current().isJava8Compatible()) {
104-
options.addStringOption('Xdoclint:none', '-quiet')
105-
}
106-
}
107-
108-
check {
109-
dependsOn(tasks.publishToMavenLocal)
110-
}
111-
112-
artifacts {
113-
archives jar
114-
115-
archives javadocJar
116-
archives sourcesJar
117-
}
118-
119-
signing {
120-
sign publishing.publications.mavenJava
121-
}
122-
123-
spotlessJavaCheck.dependsOn spotlessJavaApply
83+
compileJava.dependsOn(tasks.spotlessApply)
84+
check.dependsOn(tasks.publishToMavenLocal)

0 commit comments

Comments
 (0)