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

(cherry picked from commit 3a2ca2e)
  • Loading branch information
liblit committed Mar 31, 2024
1 parent d4fa4ca commit e41ef90
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 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
2 changes: 1 addition & 1 deletion cast/cast/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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
7 changes: 4 additions & 3 deletions cast/smoke_main/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,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

0 comments on commit e41ef90

Please sign in to comment.