Gradle KTS (#24631)

Summary:
Convert root Gradle script to Kotlin DSL, and cleanup. Currently, there is not much benefit or advantage over Groovy scripts, except IDE support and it'll cache compiled KTS scripts on first run.

[Android] [Changed] - Convert root Gradle script to Kotlin DSL, and cleanup.
Pull Request resolved: https://github.com/facebook/react-native/pull/24631

Differential Revision: D15120190

Pulled By: cpojer

fbshipit-source-id: 86691db5c7746e71bb243ebc263c1a3075ee9a9e
This commit is contained in:
Dulmandakh 2019-04-29 02:35:51 -07:00 committed by Facebook Github Bot
parent 8f186b84ae
commit bb6f316c87
4 changed files with 10 additions and 16 deletions

View File

@ -4,10 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
apply plugin: 'com.android.application'
import com.android.build.OutputFile
plugins {
id("com.android.application")
}
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets

View File

@ -6,7 +6,7 @@
plugins {
id("com.android.library")
id("maven")
id("de.undercouch.download")
id("de.undercouch.download") version "3.4.3"
}
import de.undercouch.gradle.tasks.download.Download

View File

@ -11,7 +11,6 @@ buildscript {
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.0")
classpath("de.undercouch:gradle-download-task:3.4.3")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@ -20,17 +19,11 @@ buildscript {
allprojects {
repositories {
mavenLocal()
maven {
url("$rootDir/node_modules/jsc-android/dist")
url = uri("$rootDir/node_modules/jsc-android/dist")
}
mavenLocal()
google()
jcenter()
def androidSdk = System.getenv("ANDROID_SDK")
maven {
url("$androidSdk/extras/m2repository/")
}
}
}

View File

@ -3,5 +3,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
include(":ReactAndroid")
include(":RNTester:android:app")
include(
":ReactAndroid",
":RNTester:android:app"
)