84 lines
2.0 KiB
Groovy
84 lines
2.0 KiB
Groovy
buildscript {
|
|
ext.safeExtGet = {prop, fallback ->
|
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath("com.android.tools.build:gradle:7.4.2")
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
|
|
}
|
|
}
|
|
|
|
apply plugin: "com.android.library"
|
|
apply plugin: "kotlin-android"
|
|
|
|
def isNewArchitectureEnabled() {
|
|
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion safeExtGet('compileSdkVersion', 33)
|
|
|
|
namespace "com.braintreedroptinturbo"
|
|
|
|
defaultConfig {
|
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
targetSdkVersion safeExtGet('targetSdkVersion', 33)
|
|
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
disable "GradleCompatible"
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
if (isNewArchitectureEnabled()) {
|
|
java.srcDirs += ["src/newarch"]
|
|
} else {
|
|
java.srcDirs += ["src/oldarch"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
implementation "com.facebook.react:react-native:+"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.21"
|
|
|
|
// Braintree
|
|
implementation 'com.braintreepayments.api:drop-in:6.16.0'
|
|
implementation 'com.braintreepayments.api:card:4.45.0'
|
|
implementation 'com.braintreepayments.api:data-collector:4.45.0'
|
|
implementation 'com.braintreepayments.api:google-pay:4.45.0'
|
|
implementation 'com.braintreepayments.api:venmo:4.45.0'
|
|
|
|
// Google Pay
|
|
implementation 'com.google.android.gms:play-services-wallet:19.2.1'
|
|
}
|