-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Move to publishing with gradle
- Loading branch information
Showing
9 changed files
with
140 additions
and
176 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
group=com.badlogicgames.box2dlights | ||
version=1.6 | ||
POM_DESCRIPTION=2D real-time lighting using box2d | ||
POM_NAME=Box2dlights | ||
POM_URL=https://github.com/libgdx/box2dlights | ||
POM_ISSUE_URL=https://github.com/libgdx/box2dlights/issues | ||
POM_SCM_URL=https://github.com/libgdx/box2dlights | ||
POM_SCM_CONNECTION=scm:git:https://github.com/libgdx/box2dlights.git | ||
POM_SCM_DEV_CONNECTION=scm:git:https://github.com/libgdx/box2dlights.git | ||
POM_LICENCE_NAME=Apache Licence 2.0 | ||
POM_LICENCE_URL=https://www.apache.org/licenses/LICENSE-2.0 | ||
POM_LICENCE_DIST=repo |
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,72 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
versionMapping { | ||
usage('java-api') { | ||
fromResolutionOf('runtimeClasspath') | ||
} | ||
usage('java-runtime') { | ||
fromResolutionResult() | ||
} | ||
} | ||
pom { | ||
name = POM_NAME | ||
description = POM_DESCRIPTION | ||
url = POM_URL | ||
issueManagement { | ||
url = POM_ISSUE_URL | ||
} | ||
licenses { | ||
license { | ||
name = POM_LICENCE_NAME | ||
url = POM_LICENCE_URL | ||
distribution = POM_LICENCE_DIST | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "Developers" | ||
url = "https://github.com/libgdx/box2dlights/graphs/contributors" | ||
} | ||
} | ||
scm { | ||
connection = POM_SCM_CONNECTION | ||
developerConnection = POM_SCM_DEV_CONNECTION | ||
url = POM_SCM_URL | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
url = version.endsWith('SNAPSHOT') ? getSnapshotRepositoryUrl() : getReleaseRepositoryUrl() | ||
|
||
if (getRepositoryUsername() || getRepositoryPassword()) | ||
{ | ||
credentials { | ||
username = getRepositoryUsername() | ||
password = getRepositoryPassword() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useGpgCmd() | ||
sign publishing.publications.mavenJava | ||
} | ||
|
||
//Simply using "required" in signing block doesn't work because taskGraph isn't ready yet. | ||
gradle.taskGraph.whenReady { | ||
tasks.withType(Sign).tap { | ||
configureEach { | ||
onlyIf { isReleaseBuild() } | ||
} | ||
} | ||
} |
File renamed without changes.