Skip to content

Commit

Permalink
[RFR-412] Upgrade to Gradle 8 (#8)
Browse files Browse the repository at this point in the history
* [RFR-412] Upgrade gradle wrapper to 4.1.1

* Upgrade Gradle to 8
  • Loading branch information
hb0 authored Apr 25, 2023
1 parent 69b5fa0 commit 92039ea
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Add gradle.properties
run: |
cp gradle.properties.template gradle.properties
# Disable jdk version setting to as it's defined above
sed -i "s/org.gradle.java.home=/#org.gradle.java.home=/g" gradle.properties
- name: Build with Gradle
run: ./gradlew build
6 changes: 4 additions & 2 deletions .github/workflows/gradle_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Add gradle.properties
run: |
# Use the repository's automatically set up token to publish to the registry
cp gradle.properties.template gradle.properties
echo "githubUser=${{ github.actor }}" >> gradle.properties
echo "githubToken=${{ secrets.GITHUB_TOKEN }}" >> gradle.properties
# Disable jdk version setting to as it's defined above
sed -i "s/org.gradle.java.home=/#org.gradle.java.home=/g" gradle.properties
# version is required to publish artifacts to Github Registry
- name: Set version
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a https://docs.gradle.org/current/userguide/sharing_build_logic_between_subprojects.html#sec:convention_plugins[convention plugin] implemented as https://docs.gradle.org/current/userguide/custom_plugins.html#sec:precompiled_plugins[precompiled script plugin].

This Gradle Plugin is currently only tested with Gradle 7.
This Gradle Plugin is currently only tested with Gradle 7 and 8.


[[license]]
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with the Cyface Publish Plugin for Android. If not, see <http://www.gnu.org/licenses/>.
*/

buildscript {
ext.gradle_version = '7.4.2'
ext.gradle_version = '8.0.0'

repositories {
google()
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Needs to point to JDK 17 (embedded in android-studio now)
org.gradle.java.home=

githubUser=
githubToken=
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ 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
# 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
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down

0 comments on commit 92039ea

Please sign in to comment.