Skip to content

Commit

Permalink
Use new API for updating collection properties
Browse files Browse the repository at this point in the history
More details [here](better-api-for-updating-collection-properties).
  • Loading branch information
liblit committed Mar 24, 2024
1 parent d7bd366 commit 3a2ca2e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 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.addAll(
errorproneArgs.appendAll(
"-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.add("-Wl,-rpath,${library.parent}")
linkTask.linkerArgs.append("-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.addAll(
// errorproneArgs.appendAll(
// "-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.add(machines.macOS.x86_64)
targetMachines.append(machines.macOS.x86_64)
}

binaries.whenElementFinalized {
Expand All @@ -24,7 +24,7 @@ library {
.configure(
closureOf<LinkSharedLibrary> {
if (targetMachine.operatingSystemFamily.isMacOs) {
linkerArgs.add("-Wl,-install_name,@rpath/${nativeLibraryOutput.name}")
linkerArgs.append("-Wl,-install_name,@rpath/${nativeLibraryOutput.name}")
}
addJvmLibrary(this@whenElementFinalized, this, project)
})
Expand Down
9 changes: 5 additions & 4 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.add(machines.macOS.x86_64)
targetMachines.append(machines.macOS.x86_64)
}

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

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

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

// additional supporting Java class files
inputs.files(smokeMainExtraPathElements)
pathElements.addAll(smokeMainExtraPathElements)
pathElements.appendAll(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.add(machines.macOS.x86_64)
targetMachines.append(machines.macOS.x86_64)
}
privateHeaders.from(castHeaderDirectory)

Expand Down

0 comments on commit 3a2ca2e

Please sign in to comment.