Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ org.gradle.caching=true

android.useAndroidX=true

# Those 2 properties are needed to make our project compatible with
# AGP 9.0.0 for the time being. Ideally we should not opt-out of
# builtInKotlin and newDsl once AGP 9.0.0 hits stable.
# More on this: https://developer.android.com/build/releases/agp-preview#android-gradle-plugin-built-in-kotlin
android.builtInKotlin=false
android.newDsl=false

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ internal object AgpConfiguratorUtils {
project.extensions
.getByType(ApplicationAndroidComponentsExtension::class.java)
.finalizeDsl { ext ->
ext.buildFeatures.resValues = true
ext.defaultConfig.resValue(
"string",
"react_native_dev_server_ip",
Expand Down
13 changes: 8 additions & 5 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,13 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
// Using '-Xjvm-default=all' to generate default java methods for interfaces
freeCompilerArgs = listOf("-Xjvm-default=all")
// Using -PenableWarningsAsErrors=true prop to enable allWarningsAsErrors
kotlinOptions.allWarningsAsErrors = enableWarningsAsErrors()
kotlin {
compilerOptions {
// Using '-Xjvm-default=all' to generate default java methods for interfaces
freeCompilerArgs = listOf("-Xjvm-default=all")
// Using -PenableWarningsAsErrors=true prop to enable allWarningsAsErrors
allWarningsAsErrors = enableWarningsAsErrors()
}
}

defaultConfig {
Expand Down Expand Up @@ -637,6 +639,7 @@ android {
prefab = true
prefabPublishing = true
buildConfig = true
resValues = true
}

prefab {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import okhttp3.WebSocket
import okhttp3.WebSocketListener

/** Java wrapper around a C++ InspectorPackagerConnection. */
@DoNotStripAny
internal class CxxInspectorPackagerConnection(
url: String,
deviceName: String,
Expand Down
Loading