Skip to content

Commit

Permalink
Update to Gradle 7.6.2; GWT improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyettinger committed Aug 30, 2023
1 parent 146614d commit 11035a3
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 27 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ You probably also want to edit build.gradle to match the projectName and group t

You should "Find in Files" and search for any places that use the word "template" in order to find anything
you will want to replace.

This version uses Gradle 7.6.2, which is probably the last 7.x release. It took a while, but Gradle 8.x is in
another branch of this repo and is much more stable now than it was at the start of 2023. Because Gradle 8.3
is fully compatible with Java 20 (Gradle 7.x is not), and people may try to compile with Java 20, you may want
to switch to the 8.x branch. If you have Gradle plugins that are only compatible with 7.x, though, feel free
to stay using this branch; it's been battle-tested and works fine.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jar {
}

repositories {
// You can uncomment mavenLocal() if you need self-built versions, but it can be a problem with GWT or other sources dependencies.
//mavenLocal()
// You can comment out mavenLocal() if you encounter problems with GWT or other sources dependencies.
mavenLocal()
mavenCentral()
maven { url 'https://s01.oss.sonatype.org' }
google()
Expand Down
10 changes: 8 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.daemon=true
org.gradle.jvmargs=-Xms128m -Xmx512m -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8
org.gradle.configureondemand=false
# You can downgrade this for compatibility with older libGDX versions.
gdxVersion=1.11.0
gdxVersion=1.12.0

# This must match your Maven Central group if you publish there.
GROUP=com.github.tommyettinger
Expand Down Expand Up @@ -66,4 +66,10 @@ POM_DEVELOPER_URL=https://github.com/tommyettinger/
# Maven Central can be a lot more work, but is the more "professional" and stable
# of the two options.
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
# Note: if you make a GitHub release, JitPack will try to build it, but it won't be
# able to if RELEASE_SIGNING_ENABLED is true. However, Maven Central needs
# RELEASE_SIGNING_ENABLED to be true in order to accept a stable release. What you
# can do is temporarily set this variable to true when running the "publish" and
# "closeAndReleaseRepository" tasks, then set it to false, commit, and release.
# This allows both Maven Central and JitPack to build successfully.
RELEASE_SIGNING_ENABLED=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
4 changes: 0 additions & 4 deletions jitpack.yml

This file was deleted.

30 changes: 30 additions & 0 deletions src/main/resources/com/github/your_name/your_library.gwt.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN"
"https://www.gwtproject.org/doctype/2.8.2/gwt-module.dtd">
<!-- To compile to Gwt, you need to reference this file in your master .gwt.xml
file (usually called GdxDefinition.gwt.xml) as follows:
<inherits name="com.github.your_name.your_library" />
Obviously, change your_library to match your project and this file's name,
and change the source path below to match the folder next to this. When you
change com.github.your_name to a different package, that also changes the
GWT inherits line for this library. So if I changed
com.github.your_name.your_library to com.squidpony.squidlib, then this file
would have to be moved to the com/squidpony folder and renamed to
squidlib.gwt.xml . The folder next to it should also be squidlib/ . Note,
the last part of the "inherits" name is the name of this .gwt.xml file,
without any extension.
Note, you should not have a .gwt.xml file in the root of your resources/
folder. That was the way this template handled GWT in earlier versions,
but that can cause mysterious and severe issues when compiling.
-->
<module>
<!-- This relative path points to the folder that has sources in it.
This path is slash-separated and is relative to this file. -->
<source path="your_library"/>
<!-- This is a good idea because so much GWT-specific code needs libGDX,
like the libGDX reflection code. These "inherits" names are period-separated. -->
<inherits name="com.badlogic.gdx.backends.gdx_backends_gwt" />
</module>
14 changes: 0 additions & 14 deletions src/main/resources/libgdx_library_template.gwt.xml

This file was deleted.

0 comments on commit 11035a3

Please # to comment.