Skip to content

Commit

Permalink
Revert Gradle 8.7 upgrade (#1385)
Browse files Browse the repository at this point in the history
This caused configuration issues on M1 Macs; see #1383
  • Loading branch information
msridhar authored Mar 28, 2024
1 parent ab9f2e2 commit 49d9fc9
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tasks.withType<JavaCompile>().configureEach {
options.errorprone {
if (!name.contains("test", true)) {
error("NullAway")
errorproneArgs.appendAll(
errorproneArgs.addAll(
"-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala",
"-XepOpt:NullAway:JSpecifyMode=true",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fun addJvmLibrary(binary: CppBinary, linkTask: AbstractLinkTask, project: Projec

fun addRpath(linkTask: AbstractLinkTask, library: File) {
if (!(linkTask.project.rootProject.extra["isWindows"] as Boolean)) {
linkTask.linkerArgs.append("-Wl,-rpath,${library.parent}")
linkTask.linkerArgs.add("-Wl,-rpath,${library.parent}")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tasks.withType<JavaCompile>().configureEach {
disable("ReferenceEquality")
// Example for running Error Prone's auto-patcher. To run, uncomment and change the
// check name to the one you want to patch
// errorproneArgs.appendAll(
// errorproneArgs.addAll(
// "-XepPatchChecks:UnnecessaryParentheses",
// "-XepPatchLocation:IN_PLACE"
// )
Expand Down
4 changes: 2 additions & 2 deletions cast/cast/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ library {
// https://github.com/gradle/gradle/issues/18876
// is fixed
if (rootProject.extra["osName"] == "Mac OS X" && rootProject.extra["archName"] == "aarch64") {
targetMachines.append(machines.macOS.x86_64)
targetMachines.add(machines.macOS.x86_64)
}

binaries.whenElementFinalized {
Expand All @@ -24,7 +24,7 @@ library {
.configure(
closureOf<LinkSharedLibrary> {
if (targetMachine.operatingSystemFamily.isMacOs) {
linkerArgs.append("-Wl,-install_name,@rpath/${nativeLibraryOutput.name}")
linkerArgs.add("-Wl,-install_name,@rpath/${nativeLibraryOutput.name}")
}
addJvmLibrary(this@whenElementFinalized, this, project)
})
Expand Down
9 changes: 4 additions & 5 deletions cast/smoke_main/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ application {
// https://github.com/gradle/gradle/issues/18876
// is fixed
if (rootProject.extra["osName"] == "Mac OS X" && rootProject.extra["archName"] == "aarch64") {
targetMachines.append(machines.macOS.x86_64)
targetMachines.add(machines.macOS.x86_64)
}

dependencies {
Expand Down Expand Up @@ -95,16 +95,15 @@ application {

// xlator Java bytecode + implementation of native methods
val pathElements = project.objects.listProperty<File>()
pathElements.appendAll(
files("../build/classes/java/test", libxlatorTest.parent))
pathElements.addAll(files("../build/classes/java/test", libxlatorTest.parent))

// "primordial.txt" resource loaded during test
pathElements.append(coreResources.singleFile)
pathElements.add(coreResources.singleFile)
inputs.files(coreResources)

// additional supporting Java class files
inputs.files(smokeMainExtraPathElements)
pathElements.appendAll(smokeMainExtraPathElements)
pathElements.addAll(smokeMainExtraPathElements)

// all combined as a colon-delimited path list
argumentProviders.add { listOf(pathElements.get().joinToString(":")) }
Expand Down
2 changes: 1 addition & 1 deletion cast/xlator_test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ library {
// https://github.com/gradle/gradle/issues/18876
// is fixed
if (rootProject.extra["osName"] == "Mac OS X" && rootProject.extra["archName"] == "aarch64") {
targetMachines.append(machines.macOS.x86_64)
targetMachines.add(machines.macOS.x86_64)
}
privateHeaders.from(castHeaderDirectory)

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

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
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.

goto fail

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

if exist "%JAVA_EXE%" goto execute

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
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.

goto fail

Expand Down

0 comments on commit 49d9fc9

Please sign in to comment.