Skip to content

Commit

Permalink
Tagging 1.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcashman committed Jun 25, 2019
1 parent 24a7412 commit e8a617c
Show file tree
Hide file tree
Showing 9 changed files with 452 additions and 26 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.gradle
/build/
build/
out/
src/
libgdx

# Ignore Gradle GUI config
gradle-app.setting
Expand All @@ -12,3 +15,8 @@ gradle-app.setting

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

.classpath
.project
.settings/
.idea/
26 changes: 1 addition & 25 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -174,28 +175,3 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
180 changes: 180 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
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.9.0'
}
}

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.8
targetCompatibility = 1.8

dependencies {
compile "org.mini2Dx:gdx-math:$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 copyXmlClasses(type: Copy, dependsOn: copyLicenseFiles) {
from('libgdx/gdx/src/com/badlogic/gdx/utils') {
include 'BufferUtils.java', 'SerializationException.java', 'StreamUtils.java', 'XmlReader.java', 'XmlWriter.java'

filter { String line ->
line.contains('com.badlogic.gdx.graphics') ||
line.contains('com.badlogic.gdx.utils.Scaling') ||
line.contains('import com.badlogic.gdx.files.FileHandle;') ||
line.contains('com.badlogic.gdx.utils.StringBuilder') ? null : (
line.contains("package com.badlogic.gdx.utils;") ? "package org.mini2Dx.gdx.xml;\nimport org.mini2Dx.gdx.utils.*;\nimport java.io.*;" : (
line.contains('FileHandle file') ? line.replace('FileHandle file', 'File file') : (
line.contains("file.reader(\"UTF-8\")") ? line.replace("file.reader(\"UTF-8\")", "new FileReader(file)") : (
line.contains('com.badlogic.gdx') ? line.replace('com.badlogic.gdx', 'org.mini2Dx.gdx') : line
)
)
)
)
}
}
into 'src/main/java/org/mini2Dx/gdx/xml'
}

compileJava.dependsOn copyXmlClasses

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-xml'

scm {
connection 'scm:git:https://github.com/mini2Dx/gdx-xml.git'
developerConnection 'scm:git:[email protected]:mini2Dx/gdx-xml.git'
url 'https://github.com/mini2Dx/gdx-xml.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'
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libgdxVersion=1.9.8
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Oct 21 20:44:33 CEST 2016
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
Loading

0 comments on commit e8a617c

Please sign in to comment.