-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gradle version and build.gradle
- Loading branch information
Showing
6 changed files
with
465 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
plugins { | ||
id 'com.github.johnrengelman.shadow' version '5.2.0' | ||
id 'com.github.johnrengelman.shadow' version '7.1.2' | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java-library' | ||
apply plugin: 'com.github.johnrengelman.shadow' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
apply plugin: 'java-library' | ||
|
||
sourceCompatibility = '1.8' | ||
|
||
|
@@ -22,86 +20,25 @@ subprojects { | |
implementation 'org.slf4j:slf4j-simple:1.7.25' | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
from javadoc | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
artifacts { archives javadocJar, sourcesJar } | ||
|
||
|
||
task copyJar(type: Copy, dependsOn: shadowJar) { | ||
from shadowJar | ||
into '../build' | ||
} | ||
|
||
shadowJar.finalizedBy copyJar | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'Netherboard' | ||
packaging 'jar' | ||
description 'Scoreboard API for your Minecraft Sponge and Bukkit Plugins.' | ||
url 'https://github.com/MinusKube/Netherboard' | ||
|
||
scm { | ||
connection 'scm:git:git://github.com/MinusKube/Netherboard.git' | ||
developerConnection 'scm:git:ssh://github.com:MinusKube/Netherboard.git' | ||
url 'http://github.com/MinusKube/Netherboard/tree/master' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'GNU General Public License v3.0' | ||
url 'https://www.gnu.org/licenses/gpl-3.0.en.html' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'minuskube' | ||
name 'MinusKube' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
project(':core') { | ||
shadowJar { | ||
archiveName = 'Netherboard-API-' + project.version + '.jar' | ||
archiveFileName = 'Netherboard-API-' + project.version + '.jar' | ||
} | ||
|
||
archivesBaseName = 'netherboard-core' | ||
} | ||
|
||
project(':bukkit') { | ||
shadowJar { | ||
archiveName = 'Netherboard-Bukkit-' + project.version + '.jar' | ||
archiveFileName = 'Netherboard-Bukkit-' + project.version + '.jar' | ||
} | ||
|
||
archivesBaseName = 'netherboard-bukkit' | ||
|
@@ -120,7 +57,7 @@ project(':bukkit') { | |
|
||
project(':sponge') { | ||
shadowJar { | ||
archiveName = 'Netherboard-Sponge-' + project.version + '.jar' | ||
archiveFileName = 'Netherboard-Sponge-' + project.version + '.jar' | ||
} | ||
|
||
archivesBaseName = 'netherboard-sponge' | ||
|
@@ -135,3 +72,60 @@ project(':sponge') { | |
api project(':core') | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'signing' | ||
apply plugin: 'maven-publish' | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = archivesBaseName | ||
|
||
pom { | ||
name = 'Netherboard' | ||
description = 'Scoreboard API for your Minecraft Sponge and Bukkit Plugins.' | ||
url = 'https://github.com/MinusKube/Netherboard' | ||
|
||
licenses { | ||
license { | ||
name = 'Apache License v2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'minuskube' | ||
name = 'MinusKube' | ||
email = '[email protected]' | ||
} | ||
} | ||
|
||
scm { | ||
connection = 'scm:git:git://github.com/MinusKube/Netherboard.git' | ||
developerConnection = 'scm:git:ssh://github.com:MinusKube/Netherboard.git' | ||
url = 'http://github.com/MinusKube/Netherboard/tree/master' | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
def releasesRepoUrl = layout.buildDirectory.dir('https://oss.sonatype.org/service/local/staging/deploy/maven2/') | ||
def snapshotsRepoUrl = layout.buildDirectory.dir('https://oss.sonatype.org/content/repositories/snapshots/') | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenJava | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Wed Jun 10 01:50:36 CEST 2020 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.