Skip to content

Commit

Permalink
fix(android): additional config to better support Kotlin modules (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Nov 23, 2021
1 parent eea3be2 commit 21d34d7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
5 changes: 1 addition & 4 deletions android/app/build.gradle
Expand Up @@ -14,10 +14,6 @@ buildscript {
google()
mavenCentral()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

repositories {
Expand All @@ -30,6 +26,7 @@ repositories {

// TODO: Remove these when they've been published to Maven Central.
// See https://github.com/microsoft/react-native-test-app/issues/305
// noinspection JcenterRepositoryObsolete
jcenter() {
content {
includeGroup("com.facebook.fbjni")
Expand Down
1 change: 1 addition & 0 deletions example/android/build.gradle
Expand Up @@ -9,5 +9,6 @@ buildscript { scriptHandler ->

dependencies {
classpath "com.android.tools.build:gradle:$androidPluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
1 change: 1 addition & 0 deletions scripts/configure.js
Expand Up @@ -420,6 +420,7 @@ const getConfig = (() => {
"",
" dependencies {",
` classpath "com.android.tools.build:gradle:$androidPluginVersion"`,
` classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"`,
" }",
"}",
""
Expand Down
3 changes: 1 addition & 2 deletions test-app.gradle
@@ -1,7 +1,6 @@
import groovy.json.JsonSlurper
import org.gradle.initialization.DefaultSettings

import java.nio.file.Paths
import org.gradle.initialization.DefaultSettings

private static void applySettings(Settings settings) {
def projectDir = settings.findNodeModulesPath(settings.rootDir, "react-native-test-app")
Expand Down
3 changes: 3 additions & 0 deletions test/configure/__snapshots__/gatherConfig.test.js.snap
Expand Up @@ -77,6 +77,7 @@ Object {
dependencies {
classpath \\"com.android.tools.build:gradle:$androidPluginVersion\\"
classpath \\"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion\\"
}
}
",
Expand Down Expand Up @@ -487,6 +488,7 @@ Object {
dependencies {
classpath \\"com.android.tools.build:gradle:$androidPluginVersion\\"
classpath \\"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion\\"
}
}
",
Expand Down Expand Up @@ -653,6 +655,7 @@ Object {
dependencies {
classpath \\"com.android.tools.build:gradle:$androidPluginVersion\\"
classpath \\"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion\\"
}
}
",
Expand Down

0 comments on commit 21d34d7

Please sign in to comment.