Skip to content

Commit d5232dc

Browse files
committed
Remove warnings
1 parent 5b88b07 commit d5232dc

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

packages/react-native-gesture-handler/android/build.gradle.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ android {
131131
sourceSets["main"].java.srcDirs(buildListOfJavaSrcDirs())
132132

133133
if (isGHExampleApp()) {
134+
val androidDir = project.projectDir
135+
134136
tasks.withType<com.android.build.gradle.tasks.ExternalNativeBuildJsonTask>().configureEach {
135137
doLast {
136138
val hashRegex = """/Debug/([^/]+)/logs""".toRegex()
@@ -144,14 +146,12 @@ android {
144146
val archResults = archRegex.find(path)
145147
val arch = archResults?.groups?.get(1)?.value
146148

147-
val rootDir = File(project.projectDir, "../../..")
148-
val generated = File(project.projectDir, ".cxx/Debug/$hash/$arch/compile_commands.json")
149-
150-
if (generated != null) {
151-
val output = File(rootDir, "compile_commands.json")
152-
output.writeText(generated.readText())
153-
println("Generated clangd metadata.")
154-
}
149+
val rootDir = File(androidDir, "../../..")
150+
val generated = File(androidDir, ".cxx/Debug/$hash/$arch/compile_commands.json")
151+
val output = File(rootDir, "compile_commands.json")
152+
output.writeText(generated.readText())
153+
154+
println("Generated clangd metadata.")
155155
}
156156
}
157157
}

packages/react-native-gesture-handler/android/settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ dependencyResolutionManagement {
2020
}
2121

2222
include("lib")
23+
project(":lib").projectDir.mkdirs()

0 commit comments

Comments
 (0)