forked from gurkenlabs/litiengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilize gradle nexus publish plugin.
- Loading branch information
1 parent
83de67d
commit 735d30c
Showing
10 changed files
with
149 additions
and
103 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 was deleted.
Oops, something went wrong.
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,14 +1,28 @@ | ||
plugins { | ||
id "java" | ||
alias libs.plugins.spotless | ||
alias libs.plugins.versions | ||
alias libs.plugins.dependencyCheck | ||
alias libs.plugins.grgit | ||
alias libs.plugins.semanticVersioning | ||
id "java" | ||
alias libs.plugins.nexusPublish | ||
} | ||
|
||
apply from: "$rootDir/gradle/licensing.gradle" | ||
apply from: "$rootDir/gradle/versioning.gradle" | ||
|
||
subprojects { | ||
project.version = rootProject.version | ||
} | ||
|
||
group = gurkenlabs_group | ||
|
||
nexusPublishing { | ||
useStaging.set(!isSnapshotVersion()) | ||
repositories { | ||
sonatype { | ||
username = project.findProperty('sonatypeUsername') ?: project.findProperty('OSSRH_USERNAME') ?: '' | ||
password = project.findProperty('sonatypePassword') ?: project.findProperty('OSSRH_PASSWORD') ?: '' | ||
} | ||
} | ||
} |
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,25 +1,27 @@ | ||
ext.LITIENGINE_artifact = "litiengine" | ||
ext.LITIENGINE_name = "LITIENGINE" | ||
ext.LITIENGINE_description = "The FOSS 2D Java game engine." | ||
ext.LITIENGINE_url = "https://litiengine.com/" | ||
ext.LITIENGINE_scm_url = "https://github.com/gurkenlabs/litiengine" | ||
ext.LITIENGINE_scm_con = "scm:https://github.com/gurkenlabs/litiengine.git" | ||
ext.LITIENGINE_scm_devCon = "scm:[email protected]:gurkenlabs/litiengine.git" | ||
|
||
ext.MIT_name = "MIT" | ||
ext.MIT_url = "https://mit-license.org/" | ||
|
||
ext.utiLITI_artifact = "utiliti" | ||
ext.utiLITI_name = "utiLITI" | ||
ext.utiLITI_description = "$utiLITI_name is the official project / asset manager and map editor for $LITIENGINE_name." | ||
|
||
ext.gurkenlabs_group = "de.gurkenlabs" | ||
ext.gurkenlabs_name = "gurkenlabs" | ||
ext.gurkenlabs_description = "Two Bavarian brothers, one goal: Create the purest, most comprehensible Java 2D game engine out there." | ||
ext.gurkenlabs_url = "https://gurkenlabs.de/" | ||
ext.copyright = "2014-${Calendar.getInstance().get(Calendar.YEAR)} $gurkenlabs_name" | ||
|
||
tasks.register("createLicenseProperties") { | ||
dependsOn processResources | ||
doLast { | ||
new File("$buildDir/resources/main/licensing.properties").withWriter { w -> | ||
Properties p = new Properties() | ||
p['copyright'] = copyright.toString() | ||
p['website'] = gurkenlabs_url | ||
p['version'] = version | ||
p.store w, null | ||
} | ||
} | ||
} | ||
classes { | ||
dependsOn createLicenseProperties | ||
} | ||
|
||
ext.steffen_id = "sQn" | ||
ext.steffen_mail = "[email protected]" | ||
ext.steffen_name = "Steffen Wilke" | ||
ext.matthias_id = "nightm4re" | ||
ext.matthias_mail = "[email protected]" | ||
ext.matthias_name = "Matthias Wilke" |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apply plugin: "maven-publish" | ||
apply plugin: "signing" | ||
|
||
java { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
groupId = gurkenlabs_group | ||
artifactId = LITIENGINE_artifact | ||
version = project.version | ||
from components.java | ||
pom { | ||
name.set(LITIENGINE_name) | ||
description.set(LITIENGINE_description) | ||
url.set(LITIENGINE_url) | ||
licenses { | ||
license { | ||
name.set(MIT_name) | ||
url.set(MIT_url) | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set(steffen_id) | ||
name.set(steffen_name) | ||
email.set(steffen_mail) | ||
} | ||
developer { | ||
id.set(matthias_id) | ||
name.set(matthias_name) | ||
email.set(matthias_mail) | ||
} | ||
} | ||
scm { | ||
connection.set(LITIENGINE_scm_con) | ||
developerConnection.set(LITIENGINE_scm_devCon) | ||
url.set(LITIENGINE_scm_url) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
if (project.hasProperty("signingKey")) { | ||
useInMemoryPgpKeys(findProperty("signingKey"), findProperty("signingPassword")) | ||
} else { | ||
useGpgCmd() | ||
} | ||
sign(publishing.publications.mavenJava) | ||
} |
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
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,4 +1,3 @@ | ||
|
||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
|
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