Skip to content

Commit

Permalink
Merge branch 'master' into renovate/com.github.siom79.japicmp-japicmp…
Browse files Browse the repository at this point in the history
…-0.x

# Conflicts:
#	build.gradle.kts
  • Loading branch information
Goooler committed Jul 31, 2024
2 parents e2812b9 + 889f646 commit acdd3c1
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 48 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
jdk: [ 8, 11, 17, 21 ]
jdk: [ 8, 11, 17, 21, 22 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- uses: gradle/gradle-build-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
validate-wrappers: true
- name: Build
run: ./gradlew build "-Pme.champeau.japicmp.javaToolchain.test=${{ matrix.jdk }}"
21 changes: 0 additions & 21 deletions .github/workflows/gradle-wrapper-validation.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ tasks.withType<Test>().configureEach {
maxParallelForks = if (isCiBuild) {
Runtime.getRuntime().availableProcessors()
} else {
// https://docs.gradle.org/8.0/userguide/performance.html#execute_tests_in_parallel
(Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
// https://docs.gradle.org/8.8/userguide/performance.html#execute_tests_in_parallel
(Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
}
}

Expand All @@ -28,6 +28,7 @@ val testJdk = providers.gradleProperty("me.champeau.japicmp.javaToolchain.test")
allGradle.forEach { gradleVersion ->
if (gradleVersion < "7.3" && testJdk >= 17) return@forEach
if (gradleVersion < "8.5" && testJdk >= 21) return@forEach
if (gradleVersion < "8.8" && testJdk >= 22) return@forEach

val task = tasks.register<Test>("testJdk${testJdk}onGradle${gradleVersion}") {
group = LifecycleBasePlugin.VERIFICATION_GROUP
Expand Down
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-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/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 Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath "me.champeau.gradle:japicmp-gradle-plugin:0.4.2"
classpath "me.champeau.gradle:japicmp-gradle-plugin:0.4.3"
}
}

Expand Down
18 changes: 9 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pluginManagement {
}

plugins {
id("com.gradle.enterprise") version "3.16.1"
id("com.gradle.develocity") version "3.17.6"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

Expand All @@ -20,12 +20,12 @@ dependencyResolutionManagement {

rootProject.name = "japicmp-gradle-plugin"

val isCiBuild = providers.environmentVariable("CI").isPresent

gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlwaysIf(isCiBuild)
}
develocity {
buildScan {
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
// TODO: workaround for https://github.com/gradle/gradle/issues/22879.
val isCI = providers.environmentVariable("CI").isPresent
publishing.onlyIf { isCI }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class ClasspathIsUsedFunctionalTest extends BaseFunctionalTest {
case JavaVersion.VERSION_21:
byteCodeVersion = '65.0'
break
case JavaVersion.VERSION_22:
byteCodeVersion = '66.0'
break
default:
throw new IllegalStateException("Need to update the byteCode version mapping for Java ${JavaVersion.current()}, you can ref https://javaalmanac.io/bytecode/versions")
}
Expand Down

0 comments on commit acdd3c1

Please sign in to comment.