Skip to content

Commit

Permalink
Gradle KTS (#24631)
Browse files Browse the repository at this point in the history
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: #24631

Differential Revision: D15120190

Pulled By: cpojer

fbshipit-source-id: 86691db5c7746e71bb243ebc263c1a3075ee9a9e
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Apr 29, 2019
1 parent 8f186b8 commit bb6f316
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
7 changes: 3 additions & 4 deletions RNTester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 2 additions & 9 deletions build.gradle → build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/")
}
}
}
6 changes: 4 additions & 2 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

0 comments on commit bb6f316

Please sign in to comment.