Skip to content
Open
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
2 changes: 1 addition & 1 deletion apps/basic-example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ android {
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions apps/basic-example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ hermesEnabled=true
# This allows your app to draw behind system bars for an immersive UI.
# Note: Only works with ReactActivity and should not be used with custom Activity.
edgeToEdgeEnabled=false

# Opt out of built-in kotlin and new DSL behavior that ships with AGP 9.
# Starting from AGP 10.x these opt outs will be removed.
android.builtInKotlin=false
android.newDsl=false
Comment thread
hurali97 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
Comment thread
hurali97 marked this conversation as resolved.
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
27 changes: 21 additions & 6 deletions packages/react-native-gesture-handler/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,22 @@ if (isNewArchitectureEnabled()) {
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

def shouldEnableAgpFallback() {
def agpMajorVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
if (agpMajorVersion <= 8) {
return true
}

def propertyVal = providers.gradleProperty("android.builtInKotlin").orNull
def isBuiltInKotlinEnabled = propertyVal != null ? propertyVal.toBoolean() : true

return !isBuiltInKotlinEnabled
Comment thread
hurali97 marked this conversation as resolved.
}

if (shouldEnableAgpFallback()) {
apply plugin: 'kotlin-android'
}

if (project == rootProject) {
apply from: "spotless.gradle"
Expand Down Expand Up @@ -183,17 +198,17 @@ android {
}

sourceSets.main {
java {
kotlin {
if (shouldUseCommonInterfaceFromReanimated()) {
srcDirs += 'reanimated/src/main/java'
directories.add('reanimated/src/main/java')
} else {
srcDirs += 'noreanimated/src/main/java'
directories.add('noreanimated/src/main/java')
}

if (shouldUseCommonInterfaceFromRNSVG()) {
srcDirs += 'svg/src/main/java'
directories.add('svg/src/main/java')
} else {
srcDirs += 'nosvg/src/main/java'
directories.add('nosvg/src/main/java')
}
}
}
Comment thread
hurali97 marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
Comment thread
hurali97 marked this conversation as resolved.
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading