Skip to content
Merged
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
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 @@ -201,17 +216,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
coderabbitai[bot] marked this conversation as resolved.
}
}
}
Comment thread
hurali97 marked this conversation as resolved.
Expand Down
Loading