-
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.
Initial release based on LibGDX 1.9.5
- Loading branch information
1 parent
2fe232e
commit df66394
Showing
11 changed files
with
461 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
.gradle | ||
build/ | ||
bin/ | ||
libgdx/ | ||
src/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
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,2 +1,18 @@ | ||
# gdx-audio | ||
LibGDX Audio interfaces extracted into a standalone library | ||
|
||
## Mechanism | ||
|
||
The gradle build will checkout a specific version of libgdx, copy the audio source files into src/main/java, package renamed from _com.badlogic_ to _org.mini2Dx_ and compile the standalone jar. | ||
|
||
## Usage | ||
|
||
```gradle | ||
compile "org.mini2Dx:gdx-audio:1.9.5" | ||
``` | ||
|
||
This project's only dependency is [gdx-collections](https://github.com/mini2Dx/gdx-collections). | ||
|
||
## Included Classes | ||
|
||
The entire _com.badlogic.gdx.audio_ package is included |
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,8 @@ | ||
To upload a release to Maven Central you first must follow the [OSSRH guide](http://central.sonatype.org/pages/ossrh-guide.html) to register an account and receive permissions to the org.mini2Dx project group. | ||
|
||
Once you've registered, set up your PGP key per the guide [here](http://nemerosa.ghost.io/2015/07/01/publishing-to-the-maven-central-using-gradle/) and add the required details to ~/.gradle/gradle.properties. | ||
|
||
Then you can build and publish a release with the following command: | ||
```bash | ||
./gradlew -Prelease clean build uploadArchives closeAndPromoteRepository | ||
``` |
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,171 @@ | ||
import org.apache.tools.ant.filters.* | ||
|
||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url 'https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/' } | ||
jcenter() | ||
maven { url 'https://plugins.gradle.org/m2/' } | ||
} | ||
dependencies { | ||
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3' | ||
} | ||
} | ||
|
||
if(project.hasProperty('ossrhUser') && project.hasProperty("release")) { | ||
apply plugin: "io.codearte.nexus-staging" | ||
|
||
nexusStaging { | ||
packageGroup = 'org.mini2Dx' | ||
username = ossrhUser | ||
password = ossrhPassword | ||
} | ||
} | ||
|
||
apply plugin: "java" | ||
apply plugin: "signing" | ||
apply plugin: "maven" | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
group = 'org.mini2Dx' | ||
version = "$libgdxVersion" | ||
|
||
sourceCompatibility = 1.7 | ||
targetCompatibility = 1.7 | ||
|
||
dependencies { | ||
compile "org.mini2Dx:gdx-collections:$libgdxVersion" | ||
} | ||
|
||
task cleanSrcDir(type: Delete) { | ||
delete 'src/main/java/org' | ||
} | ||
clean.dependsOn cleanSrcDir | ||
|
||
File libGdxDirectory = file("libgdx"); | ||
|
||
if(libGdxDirectory.exists()) { | ||
task checkoutLibGdxMaster(type: Exec) { | ||
workingDir './libgdx' | ||
commandLine 'git', 'checkout', 'master' | ||
} | ||
|
||
task pullLatestLibGdxMaster(type: Exec, dependsOn: checkoutLibGdxMaster) { | ||
workingDir './libgdx' | ||
commandLine 'git', 'pull', 'origin', 'master' | ||
} | ||
|
||
task fetchLatestLibGdxTags(type: Exec, dependsOn: pullLatestLibGdxMaster) { | ||
workingDir './libgdx' | ||
commandLine 'git', 'fetch', '--tags', 'origin', 'master' | ||
} | ||
} else { | ||
task fetchLatestLibGdxTags(type: Exec) { | ||
commandLine 'git', 'clone', '--progress', 'https://github.com/libgdx/libgdx.git', 'libgdx' | ||
} | ||
} | ||
|
||
task checkoutLibGdxTag(type: Exec, dependsOn: fetchLatestLibGdxTags) { | ||
workingDir './libgdx' | ||
commandLine 'git', 'checkout', "$libgdxVersion" | ||
} | ||
|
||
task copyLicenseFiles(type: Copy, dependsOn: checkoutLibGdxTag) { | ||
from('libgdx') { | ||
include 'LICENSE' | ||
} | ||
into './' | ||
} | ||
|
||
task copyAudioInterfaces(type: Copy, dependsOn: copyLicenseFiles) { | ||
from('libgdx/gdx/src/com/badlogic/gdx/audio') { | ||
include '**/*.java' | ||
|
||
filter { String line -> | ||
line.contains('import') ? ( | ||
line.contains('com.badlogic.gdx.utils') ? line.replace('com.badlogic.gdx.utils', 'org.mini2Dx.gdx.utils') : null | ||
) : line | ||
} | ||
} | ||
into 'src/main/java/org/mini2Dx/gdx/audio' | ||
} | ||
|
||
compileJava.dependsOn copyAudioInterfaces | ||
|
||
if (JavaVersion.current().isJava8Compatible()) { | ||
allprojects { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
} | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
from javadoc | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar | ||
} | ||
|
||
if(project.hasProperty('ossrhUser')) { | ||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
// POM signature | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
// Target repository | ||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUser, password: ossrhPassword) | ||
} | ||
pom.project { | ||
name project.name | ||
description project.description | ||
packaging 'jar' | ||
url 'https://github.com/mini2Dx/gdx-math' | ||
|
||
scm { | ||
connection 'scm:git:https://github.com/mini2Dx/gdx-math.git' | ||
developerConnection 'scm:git:[email protected]:mini2Dx/gdx-math.git' | ||
url 'https://github.com/mini2Dx/gdx-math.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'Apache License, Version 2.0' | ||
url 'https://opensource.org/licenses/Apache-2.0' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'tomcashman' | ||
name = 'Thomas Cashman' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '2.14.1' | ||
} |
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 @@ | ||
libgdxVersion=1.9.5 |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Sat Jan 21 16:00:26 CET 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip |
Oops, something went wrong.