Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Tom-Ski/master
Mavenized/Gradle'ized so we can push snapshots and releases.
- Loading branch information
Showing
2 changed files
with
61 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apply plugin: "maven-publish" | ||
|
||
groupName = 'com.badlogicgames.ashley' | ||
idName = 'ashley' | ||
artifactVersion = '1.0.0-SNAPSHOT' | ||
|
||
ext.snapshotUser = hasProperty('snapshotUser') ? snapshotUser : "" | ||
ext.snapshotPass = hasProperty('snapshotPass') ? snapshotPass : "" | ||
ext.releaseUser = hasProperty('releaseUser') ? releaseUser : "" | ||
ext.releasePass = hasProperty('releasePass') ? releasePass : "" | ||
|
||
task sourceJar(type: Jar) { | ||
from sourceSets.main.allJava | ||
} | ||
|
||
task javadocsJar(type: Jar, dependsOn: javadoc) { | ||
from javadoc.destinationDir | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
groupId groupName | ||
artifactId idName | ||
version artifactVersion | ||
|
||
artifact sourceJar { | ||
classifier "sources" | ||
} | ||
|
||
artifact javadocsJar { | ||
classifier "javadoc" | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url = artifactVersion.endsWith("SNAPSHOT") ? "https://oss.sonatype.org/content/repositories/snapshots/" : "http://repo1.maven.org/maven2/" | ||
credentials { | ||
if (artifactVersion.endsWith("SNAPSHOT")) { | ||
username snapshotUser | ||
password snapshotPass | ||
} else { | ||
username releaseUser | ||
password releasePass | ||
} | ||
} | ||
} | ||
|
||
} | ||
} |