Skip to content

Commit 1e35481

Browse files
committed
Migrating plugin to newest versions
1 parent 0f3d289 commit 1e35481

File tree

3 files changed

+61
-61
lines changed

3 files changed

+61
-61
lines changed

build.gradle

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
buildscript {
2-
repositories {
3-
maven {
4-
url "https://plugins.gradle.org/m2/"
5-
}
6-
}
7-
dependencies {
8-
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
9-
}
10-
}
111
plugins {
12-
id "io.codearte.nexus-staging" version "0.21.1" // close and release sonatype artifcats
2+
id 'net.researchgate.release' version '3.0.2'
3+
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
134
}
145

156
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
repositoryUrl=https://github.com/mageddo-projects/annotation-processing-tools.git
2-
version=2.4.0
2+
version=2.4.1

nexus.gradle

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,81 @@
1-
println ("> :${project.name}")
1+
println("> :${project.name}")
22

3-
apply plugin: "maven"
43
apply plugin: "maven-publish"
5-
apply plugin: "de.marcphilipp.nexus-publish" // upload artificates to sonatype
64

75
task sourcesJar(type: Jar) {
8-
from sourceSets.main.allJava
9-
archiveClassifier = 'sources'
6+
from sourceSets.main.allJava
7+
archiveClassifier = 'sources'
108
}
119

1210
task javadocJar(type: Jar) {
13-
from javadoc
14-
archiveClassifier = 'javadoc'
11+
from javadoc
12+
archiveClassifier = 'javadoc'
1513
}
1614

1715
artifacts {
18-
archives javadocJar, sourcesJar
16+
archives javadocJar, sourcesJar
1917
}
2018

2119
publishing {
22-
publications {
23-
mavenJava(MavenPublication) {
24-
from(components.java)
25-
artifact sourcesJar
26-
artifact javadocJar
27-
pom {
28-
name = project.name
29-
packaging = 'jar'
30-
description = project.description
31-
url = "${projectPage}"
20+
publications {
21+
mavenJava(MavenPublication) {
22+
from(components.java)
23+
artifact sourcesJar
24+
artifact javadocJar
25+
pom {
26+
name = project.name
27+
packaging = 'jar'
28+
description = project.description
29+
url = "${projectUrl}"
3230

33-
scm {
34-
connection = "${repositoryUrl}"
35-
developerConnection = "${repositoryUrl}"
36-
url = "${repositoryUrl}"
37-
}
31+
scm {
32+
connection = "${projectUrl}"
33+
developerConnection = "${projectUrl}"
34+
url = "${projectUrl}"
35+
}
3836

39-
licenses {
40-
license {
41-
name = 'The Apache License, Version 2.0'
42-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
43-
}
44-
}
37+
licenses {
38+
license {
39+
name = 'The Apache License, Version 2.0'
40+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
41+
}
42+
}
4543

46-
developers {
47-
developer {
48-
id = 'mageddo'
49-
name = 'Elvis Souza'
50-
51-
}
52-
}
53-
}
54-
}
55-
}
44+
developers {
45+
developer {
46+
id = 'mageddo'
47+
name = 'Elvis Souza'
48+
49+
}
50+
}
51+
}
52+
}
53+
}
54+
repositories {
55+
mavenCentral {
56+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
57+
credentials {
58+
username = project.findProperty("ossrhUsername")
59+
password = project.findProperty("ossrhPassword")
60+
}
61+
}
62+
}
5663
}
5764

5865
nexusPublishing {
59-
repositories {
60-
sonatype{
61-
username = project.findProperty("ossrhUsername")
62-
password = project.findProperty("ossrhPassword")
63-
}
64-
}
66+
repositories {
67+
mavenCentral {
68+
nexusUrl = uri("https://oss.sonatype.org/service/local/")
69+
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
70+
username = project.findProperty("ossrhUsername")
71+
password = project.findProperty("ossrhPassword")
72+
}
73+
}
6574
}
6675

6776
if (project.hasProperty("signing.keyId")) {
68-
apply plugin: 'signing'
69-
signing {
70-
sign publishing.publications.mavenJava
71-
}
77+
apply plugin: 'signing'
78+
signing {
79+
sign publishing.publications.mavenJava
80+
}
7281
}

0 commit comments

Comments
 (0)