From 8fee6ad81be0b0295d06c52218710834b7aadb8f Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 10 Feb 2021 00:34:09 -0500 Subject: [PATCH 1/8] fix(cleanup): remove extra plugin entries from generated build.gradle --- templates/android.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/android.js b/templates/android.js index 40b32385..9c20e8c3 100644 --- a/templates/android.js +++ b/templates/android.js @@ -40,9 +40,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) From f3bad7fde0769fb6d378cf67467fcf39b035f5e2 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 10 Feb 2021 00:35:16 -0500 Subject: [PATCH 2/8] update test snapshots --- .../view/__snapshots__/cli-create-with-view.test.js.snap | 3 --- .../__snapshots__/cli-create-with-defaults.test.js.snap | 3 --- .../__snapshots__/create-view-with-defaults.test.js.snap | 3 --- .../create-view-with-example-with-defaults.test.js.snap | 3 --- .../create-view-with-example-with-options.test.js.snap | 3 --- .../__snapshots__/lib-view-android-config-options.test.js.snap | 3 --- .../__snapshots__/create-with-defaults.test.js.snap | 3 --- .../create-with-example-for-android-only.test.js.snap | 3 --- .../create-with-example-with-defaults.test.js.snap | 3 --- .../recover-from-missing-package-scripts.test.js.snap | 3 --- .../create-with-example-with-null-prefix.test.js.snap | 3 --- .../create-with-example-with-options.test.js.snap | 3 --- .../__snapshots__/create-with-name-in-camel-case.test.js.snap | 3 --- .../__snapshots__/create-with-options-for-android.test.js.snap | 3 --- .../platforms-array/__snapshots__/platforms-array.test.js.snap | 3 --- .../__snapshots__/platforms-comma-separated.test.js.snap | 3 --- .../create-with-custom-module-prefix.test.js.snap | 3 --- .../__snapshots__/create-with-module-name.test.js.snap | 3 --- .../__snapshots__/cli-command-func-with-options.test.js.snap | 3 --- .../cli-program-with-defaults-for-android.test.js.snap | 3 --- .../cli-program-with-example-with-logging.test.js.snap | 3 --- .../create-with-example-with-defaults.test.js.snap | 3 --- .../__snapshots__/with-yarn-error-logging.test.js.snap | 3 --- .../create-with-example-with-options.test.js.snap | 3 --- .../create-with-example-with-options.test.js.snap | 3 --- 25 files changed, 75 deletions(-) diff --git a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap index 74629ee9..fe9eba27 100644 --- a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap +++ b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap @@ -129,9 +129,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap index 7e93bcaa..8ede03b2 100644 --- a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap +++ b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap @@ -129,9 +129,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap index 6d297930..d10a9a9e 100644 --- a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap index 8567346b..5ba160f5 100644 --- a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap @@ -207,9 +207,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap index 53626e8d..9acdfde1 100644 --- a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap @@ -207,9 +207,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap index 2083bf2a..65a98696 100644 --- a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap +++ b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap @@ -171,9 +171,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap index 4324127d..c0d20ed8 100644 --- a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap index 21959200..06eb934e 100644 --- a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap +++ b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap @@ -175,9 +175,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 2b096a82..508d033a 100644 --- a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -207,9 +207,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap index e8c18c27..3c3e925f 100644 --- a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap +++ b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap @@ -207,9 +207,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap index cccbd568..b63f1ee6 100644 --- a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap +++ b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap @@ -207,9 +207,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap index 470e743c..aaf756d0 100644 --- a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -207,9 +207,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap index 33790b81..b49b535f 100644 --- a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap +++ b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap index 742f93dd..4ba8516c 100644 --- a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap +++ b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap @@ -171,9 +171,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap index df7addb7..d49bd6ec 100644 --- a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap index 28c21a9b..16f6fd95 100644 --- a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap index 9a908323..b06efed8 100644 --- a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap +++ b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap index 131a2139..fbfa7cf0 100644 --- a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap +++ b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap @@ -203,9 +203,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap index 6a50c2cd..54dfb613 100644 --- a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap +++ b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap @@ -209,9 +209,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap index 5f8121b6..b4a6c07c 100644 --- a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap +++ b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap @@ -386,9 +386,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap index e3fbc78a..5f80a636 100644 --- a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap +++ b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap @@ -494,9 +494,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 1fa10581..411dc828 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -280,9 +280,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap index 9519e7e5..9773ac3f 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap @@ -280,9 +280,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap index a1bc2654..914b2b72 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap @@ -280,9 +280,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap index e75b8bbc..629ab5a4 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -274,9 +274,6 @@ buildscript { } } -apply plugin: 'com.android.library' -apply plugin: 'maven' - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) From 84e347800ac1799b11ad734f10e6ad975ca15651 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 10 Feb 2021 12:18:17 -0500 Subject: [PATCH 3/8] refactor! remove support for generating Maven package for Android --- templates/android.js | 73 -------------------------------------------- 1 file changed, 73 deletions(-) diff --git a/templates/android.js b/templates/android.js index 9c20e8c3..e583a770 100644 --- a/templates/android.js +++ b/templates/android.js @@ -73,79 +73,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = "${packageIdentifier}" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task "jar\${name}"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: "file://\${projectDir}/../android/maven" - configureReactNativePom pom - } - } -} `, }, { name: () => `${platform}/src/main/AndroidManifest.xml`, From 9d07af1af9be9cabc8e58d3d62c4f6776d84aff7 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 10 Feb 2021 12:20:10 -0500 Subject: [PATCH 4/8] refactor! remove Android root build support --- templates/android.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/templates/android.js b/templates/android.js index e583a770..8f143334 100644 --- a/templates/android.js +++ b/templates/android.js @@ -1,6 +1,6 @@ module.exports = platform => [{ name: () => `${platform}/build.gradle`, - content: ({ packageIdentifier }) => `// ${platform}/build.gradle + content: () => `// ${platform}/build.gradle // based on: // @@ -24,22 +24,6 @@ def safeExtGet(prop, fallback) { apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) From fde2b59f14f90d38ce43f2d49fbdf093ca9f7d9f Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 10 Feb 2021 12:20:31 -0500 Subject: [PATCH 5/8] refactor! remove default Android SDK versions --- templates/android.js | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/templates/android.js b/templates/android.js index 8f143334..9dbd9dd9 100644 --- a/templates/android.js +++ b/templates/android.js @@ -2,34 +2,19 @@ module.exports = platform => [{ name: () => `${platform}/build.gradle`, content: () => `// ${platform}/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName "1.0" } From ee894aad3bcf6cfaa412c2986f34b527fbb5c4b4 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 10 Feb 2021 12:43:14 -0500 Subject: [PATCH 6/8] update affected test snapshots --- .../cli-create-with-view.test.js.snap | 116 +----------------- .../cli-create-with-defaults.test.js.snap | 116 +----------------- .../create-view-with-defaults.test.js.snap | 116 +----------------- ...ew-with-example-with-defaults.test.js.snap | 116 +----------------- ...iew-with-example-with-options.test.js.snap | 116 +----------------- ...b-view-android-config-options.test.js.snap | 116 +----------------- .../create-with-defaults.test.js.snap | 116 +----------------- ...with-example-for-android-only.test.js.snap | 116 +----------------- ...te-with-example-with-defaults.test.js.snap | 116 +----------------- ...-from-missing-package-scripts.test.js.snap | 116 +----------------- ...with-example-with-null-prefix.test.js.snap | 116 +----------------- ...ate-with-example-with-options.test.js.snap | 116 +----------------- ...reate-with-name-in-camel-case.test.js.snap | 116 +----------------- ...eate-with-options-for-android.test.js.snap | 116 +----------------- .../platforms-array.test.js.snap | 116 +----------------- .../platforms-comma-separated.test.js.snap | 116 +----------------- ...ate-with-custom-module-prefix.test.js.snap | 116 +----------------- .../create-with-module-name.test.js.snap | 116 +----------------- ...cli-command-func-with-options.test.js.snap | 116 +----------------- ...ram-with-defaults-for-android.test.js.snap | 116 +----------------- ...ram-with-example-with-logging.test.js.snap | 116 +----------------- ...te-with-example-with-defaults.test.js.snap | 116 +----------------- .../with-yarn-error-logging.test.js.snap | 116 +----------------- ...ate-with-example-with-options.test.js.snap | 116 +----------------- ...ate-with-example-with-options.test.js.snap | 116 +----------------- 25 files changed, 150 insertions(+), 2750 deletions(-) diff --git a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap index fe9eba27..32d79557 100644 --- a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap +++ b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap @@ -91,50 +91,19 @@ sdk.dir=/Users/{username}/Library/Android/sdk "name": "react-native-integration-view-test-package/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -162,79 +131,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap index 8ede03b2..a3b77f1b 100644 --- a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap +++ b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap @@ -91,50 +91,19 @@ sdk.dir=/Users/{username}/Library/Android/sdk "name": "react-native-integration-test-package/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -162,79 +131,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap index d10a9a9e..1e8d9e3c 100644 --- a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap index 5ba160f5..3a47d01e 100644 --- a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap @@ -169,50 +169,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -241,79 +210,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap index 9acdfde1..f4a82f45 100644 --- a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap @@ -169,50 +169,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -241,79 +210,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap index 65a98696..8fae557a 100644 --- a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap +++ b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap @@ -133,50 +133,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -205,79 +174,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap index c0d20ed8..dc744575 100644 --- a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap index 06eb934e..985bb66d 100644 --- a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap +++ b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap @@ -137,50 +137,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -209,79 +178,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 508d033a..c7029bd2 100644 --- a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -169,50 +169,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -241,79 +210,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap index 3c3e925f..bde0a6c7 100644 --- a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap +++ b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap @@ -169,50 +169,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -241,79 +210,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap index b63f1ee6..629c1f15 100644 --- a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap +++ b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap @@ -169,50 +169,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -241,79 +210,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap index aaf756d0..f9c6880c 100644 --- a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -169,50 +169,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -241,79 +210,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap index b49b535f..293e61d3 100644 --- a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap +++ b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap index 4ba8516c..f4c83b21 100644 --- a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap +++ b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap @@ -133,50 +133,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -205,79 +174,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.alicebits\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap index d49bd6ec..34ee74e8 100644 --- a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap index 16f6fd95..da3603b8 100644 --- a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap index b06efed8..68ee4e28 100644 --- a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap +++ b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: custom-native-alice-bobbi/android/src/main/AndroidManifest.xml diff --git a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap index fbfa7cf0..0d65913f 100644 --- a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap +++ b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap @@ -165,50 +165,19 @@ content: -------- // android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -237,79 +206,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules } -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: custom-native-module/android/src/main/AndroidManifest.xml diff --git a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap index 54dfb613..c66de02d 100644 --- a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap +++ b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap @@ -171,50 +171,19 @@ buck-out/ "outputFileName": "react-native-alice-bobbi/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -242,79 +211,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap index b4a6c07c..76c5b847 100644 --- a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap +++ b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap @@ -348,50 +348,19 @@ buck-out/ "outputFileName": "react-native-test-package/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -419,79 +388,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap index 5f80a636..c6e88feb 100644 --- a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap +++ b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap @@ -456,50 +456,19 @@ buck-out/ "outputFileName": "react-native-test-package/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -527,79 +496,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 411dc828..31e205a0 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -242,50 +242,19 @@ buck-out/ "outputFileName": "react-native-alice-bobbi/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -313,79 +282,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap index 9773ac3f..7a6ddab4 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap @@ -242,50 +242,19 @@ buck-out/ "outputFileName": "react-native-alice-bobbi/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -313,79 +282,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap index 914b2b72..49d3d96a 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap @@ -242,50 +242,19 @@ buck-out/ "outputFileName": "react-native-alice-bobbi/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -313,79 +282,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.reactlibrary\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap index 629ab5a4..02c87d65 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -236,50 +236,19 @@ buck-out/ "outputFileName": "react-native-alice-bobbi/android/build.gradle", "theContent": "// android/build.gradle -// based on: -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle -// -// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle -// original location: -// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle - -def DEFAULT_COMPILE_SDK_VERSION = 28 -def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 -def DEFAULT_TARGET_SDK_VERSION = 28 - -def safeExtGet(prop, fallback) { - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +def rootExtGet(prop) { + rootProject.ext.get(prop) } apply plugin: 'com.android.library' apply plugin: 'maven' -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - android { - compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) + compileSdkVersion rootExtGet('compileSdkVersion') + buildToolsVersion rootExtGet('buildToolsVersion') defaultConfig { - minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) - targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) + minSdkVersion rootExtGet('minSdkVersion') + targetSdkVersion rootExtGet('targetSdkVersion') versionCode 1 versionName \\"1.0\\" } @@ -307,79 +276,6 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules } - -def configureReactNativePom(def pom) { - def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) - - pom.project { - name packageJson.title - artifactId packageJson.name - version = packageJson.version - group = \\"com.alicebits\\" - description packageJson.description - url packageJson.repository.baseUrl - - licenses { - license { - name packageJson.license - url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename - distribution 'repo' - } - } - - developers { - developer { - id packageJson.author.username - name packageJson.author.name - } - } - } -} - -afterEvaluate { project -> - // some Gradle build hooks ref: - // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html - task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) - include '**/*.java' - } - - task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' - from androidJavadoc.destinationDir - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs - include '**/*.java' - } - - android.libraryVariants.all { variant -> - def name = variant.name.capitalize() - def javaCompileTask = variant.javaCompileProvider.get() - - task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) { - from javaCompileTask.destinationDir - } - } - - artifacts { - archives androidSourcesJar - archives androidJavadocJar - } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: \\"file://\${projectDir}/../android/maven\\" - configureReactNativePom pom - } - } -} ", }, Object { From f6a2074e4a97f0581bd5c93d82a9202c31730cbc Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 17 Feb 2021 16:06:50 -0500 Subject: [PATCH 7/8] remove generated android/README.md with Maven info no longer needed --- templates/android.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/templates/android.js b/templates/android.js index d6229b6e..0889027a 100644 --- a/templates/android.js +++ b/templates/android.js @@ -178,21 +178,4 @@ public class ${objectClassName}Package implements ReactPackage { } } `, -}, { - name: () => `${platform}/README.md`, - content: () => `README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number -` }]; From fd43f9611703afbae90f08f2ec840ee6ca8f6229 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 17 Feb 2021 16:16:42 -0500 Subject: [PATCH 8/8] update affected test snapshots (again) --- .../cli-create-with-view.test.js.snap | 18 --------------- .../cli-create-with-defaults.test.js.snap | 18 --------------- .../create-view-with-defaults.test.js.snap | 22 ------------------- ...ew-with-example-with-defaults.test.js.snap | 22 ------------------- ...iew-with-example-with-options.test.js.snap | 22 ------------------- ...b-view-android-config-options.test.js.snap | 22 ------------------- .../create-with-defaults.test.js.snap | 22 ------------------- ...with-example-for-android-only.test.js.snap | 22 ------------------- ...te-with-example-with-defaults.test.js.snap | 22 ------------------- ...-from-missing-package-scripts.test.js.snap | 22 ------------------- ...with-example-with-null-prefix.test.js.snap | 22 ------------------- ...ate-with-example-with-options.test.js.snap | 22 ------------------- ...reate-with-name-in-camel-case.test.js.snap | 22 ------------------- ...eate-with-options-for-android.test.js.snap | 22 ------------------- .../platforms-array.test.js.snap | 22 ------------------- .../platforms-comma-separated.test.js.snap | 22 ------------------- ...ate-with-custom-module-prefix.test.js.snap | 22 ------------------- .../create-with-module-name.test.js.snap | 22 ------------------- ...cli-command-func-with-options.test.js.snap | 21 ------------------ ...ram-with-defaults-for-android.test.js.snap | 21 ------------------ ...ram-with-example-with-logging.test.js.snap | 21 ------------------ ...te-with-example-with-defaults.test.js.snap | 21 ------------------ .../with-yarn-error-logging.test.js.snap | 21 ------------------ ...ate-with-example-with-options.test.js.snap | 21 ------------------ ...ate-with-example-with-options.test.js.snap | 21 ------------------ 25 files changed, 535 deletions(-) diff --git a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap index 7d0ec27b..73fa7a07 100644 --- a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap +++ b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap @@ -67,24 +67,6 @@ import IntegrationViewTestPackage from 'react-native-integration-view-test-packa // TODO: What to do with the module? IntegrationViewTestPackage; \`\`\` -", - }, - Object { - "name": "react-native-integration-view-test-package/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap index 5c39e17f..762aabed 100644 --- a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap +++ b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap @@ -67,24 +67,6 @@ import IntegrationTestPackage from 'react-native-integration-test-package'; // TODO: What to do with the module? IntegrationTestPackage; \`\`\` -", - }, - Object { - "name": "react-native-integration-test-package/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap index e2916e41..a765cadf 100644 --- a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -275,26 +273,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap index ac42a739..f3201a17 100644 --- a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -279,26 +277,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap index 3969bfc9..c58b4308 100644 --- a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -279,26 +277,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap index 76e89401..6e27ab9b 100644 --- a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap +++ b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* outputFile name: react-native-alice-bobbi/README.md content: @@ -243,26 +241,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", ] diff --git a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap index ff9ae2bc..a3139695 100644 --- a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -276,26 +274,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap index 51aecad4..96475610 100644 --- a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap +++ b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* outputFile name: react-native-alice-bobbi/README.md content: @@ -248,26 +246,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* execa.commandSync command: react-native init example --version react-native@latest options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"} diff --git a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index af8d68f6..a3dd904e 100644 --- a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -280,26 +278,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap index 7dcf3dcb..91daae34 100644 --- a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap +++ b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -280,26 +278,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap index 99d066a0..fb3797ca 100644 --- a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap +++ b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -280,26 +278,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap index 8e23b47c..68633045 100644 --- a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -23,8 +23,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -280,26 +278,6 @@ public class SuperAwesomeModulePackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap index f52a6cb5..17e83e2f 100644 --- a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap +++ b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -276,26 +274,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap index db0bcd1d..cab8a2e0 100644 --- a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap +++ b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/alicebits/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/alicebits/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* outputFile name: react-native-alice-bobbi/README.md content: @@ -244,26 +242,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", ] diff --git a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap index 32efc7b2..22d5707f 100644 --- a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -276,26 +274,6 @@ public class ABCAliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap index 2b1c14e9..d80ba3cf 100644 --- a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: react-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: react-native-alice-bobbi/android/ ", "* ensureDir dir: react-native-alice-bobbi/ ", @@ -276,26 +274,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: react-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: react-native-alice-bobbi/react-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap index be414e8f..29a0d3f5 100644 --- a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap +++ b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: custom-native-alice-bobbi/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: custom-native-alice-bobbi/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: custom-native-alice-bobbi/android/ ", "* ensureDir dir: custom-native-alice-bobbi/ ", @@ -276,26 +274,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: custom-native-alice-bobbi/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: custom-native-alice-bobbi/custom-native-alice-bobbi.podspec diff --git a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap index 5a7824b5..693a0667 100644 --- a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap +++ b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap @@ -19,8 +19,6 @@ Array [ "* ensureDir dir: custom-native-module/android/src/main/java/com/reactlibrary/ ", "* ensureDir dir: custom-native-module/android/src/main/java/com/reactlibrary/ -", - "* ensureDir dir: custom-native-module/android/ ", "* ensureDir dir: custom-native-module/ ", @@ -276,26 +274,6 @@ public class AliceBobbiPackage implements ReactPackage { } } -<<<<<<<< ======== >>>>>>>> -", - "* outputFile name: custom-native-module/android/README.md -content: --------- -README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number - <<<<<<<< ======== >>>>>>>> ", "* outputFile name: custom-native-module/custom-native-module.podspec diff --git a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap index 9425629f..a0a2d3cb 100644 --- a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap +++ b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap @@ -29,9 +29,6 @@ Array [ Object { "ensureDir": "react-native-alice-bobbi/android/src/main/java/com/reactlibrary/", }, - Object { - "ensureDir": "react-native-alice-bobbi/android/", - }, Object { "ensureDir": "react-native-alice-bobbi/", }, @@ -275,24 +272,6 @@ public class AliceBobbiPackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-alice-bobbi/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap index 8873274e..ff066046 100644 --- a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap +++ b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap @@ -243,9 +243,6 @@ Array [ Object { "ensureDir": "react-native-test-package/android/src/main/java/com/reactlibrary/", }, - Object { - "ensureDir": "react-native-test-package/android/", - }, Object { "outputFileName": "react-native-test-package/README.md", "theContent": "# react-native-test-package @@ -452,24 +449,6 @@ public class TestPackagePackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-test-package/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, ] diff --git a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap index 89d1f9e9..92e96a2c 100644 --- a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap +++ b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap @@ -314,9 +314,6 @@ exampleReactNativeVersion: react-native@latest Object { "ensureDir": "react-native-test-package/android/src/main/java/com/reactlibrary/", }, - Object { - "ensureDir": "react-native-test-package/android/", - }, Object { "ensureDir": "react-native-test-package/", }, @@ -560,24 +557,6 @@ public class TestPackagePackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-test-package/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index c11394dd..5d7861cc 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -100,9 +100,6 @@ exampleReactNativeVersion: react-native@latest Object { "ensureDir": "react-native-alice-bobbi/android/src/main/java/com/reactlibrary/", }, - Object { - "ensureDir": "react-native-alice-bobbi/android/", - }, Object { "ensureDir": "react-native-alice-bobbi/", }, @@ -346,24 +343,6 @@ public class AliceBobbiPackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-alice-bobbi/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap index 62a82dc1..1d636500 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap @@ -100,9 +100,6 @@ exampleReactNativeVersion: react-native@latest Object { "ensureDir": "react-native-alice-bobbi/android/src/main/java/com/reactlibrary/", }, - Object { - "ensureDir": "react-native-alice-bobbi/android/", - }, Object { "ensureDir": "react-native-alice-bobbi/", }, @@ -346,24 +343,6 @@ public class AliceBobbiPackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-alice-bobbi/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap index 4145bbf9..3a7064aa 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap @@ -100,9 +100,6 @@ exampleReactNativeVersion: react-native@latest Object { "ensureDir": "react-native-alice-bobbi/android/src/main/java/com/reactlibrary/", }, - Object { - "ensureDir": "react-native-alice-bobbi/android/", - }, Object { "ensureDir": "react-native-alice-bobbi/", }, @@ -346,24 +343,6 @@ public class AliceBobbiPackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-alice-bobbi/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object { diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap index 1637ffdd..c2698c99 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -94,9 +94,6 @@ exampleReactNativeVersion: react-native@npm:react-native-tvos Object { "ensureDir": "react-native-alice-bobbi/android/src/main/java/com/alicebits/", }, - Object { - "ensureDir": "react-native-alice-bobbi/android/", - }, Object { "ensureDir": "react-native-alice-bobbi/", }, @@ -340,24 +337,6 @@ public class ABCAliceBobbiPackage implements ReactPackage { return Collections.emptyList(); } } -", - }, - Object { - "outputFileName": "react-native-alice-bobbi/android/README.md", - "theContent": "README -====== - -If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: - -1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed -2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK -\`\`\` -ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle -sdk.dir=/Users/{username}/Library/Android/sdk -\`\`\` -3. Delete the \`maven\` folder -4. Run \`./gradlew installArchives\` -5. Verify that latest set of generated files is in the maven folder with the correct version number ", }, Object {