Skip to content

./gradlew bundleRelease not working with -P in React Native 0.60.5 #26257

Closed
@LydGol90

Description

@LydGol90

Hi there!

On React Native 0.60.5 the ./gradlew bundleRelease command has stopped working when signing config properties are provided wit the -P flag.

Without -P:

➜  android ./gradlew bundleRelease

> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, /Users/lydiagolland/Projects/tets/android/app/build/generated/assets/react/release/index.android.bundle
info Writing sourcemap output to:, /Users/lydiagolland/Projects/tets/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 2 asset files
info Done copying assets

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1m 0s
33 actionable tasks: 33 executed

With -P

➜  android ./gradlew bundleRelease -Pandroid.injected.signing.store.file='debug.keystore' -Pandroid.injected.signing.store.password='android' -Pandroid.injected.signing.key.alias='androiddebugkey' -Pandroid.injected.signing.key.password='android'
> Task :app:validateSigningRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file '/Users/lydiagolland/Projects/tets/android/debug.keystore' not found for signing config 'externalOverride'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

React Native version:

System:
    OS: macOS 10.14.5
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 523.11 MB / 8.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
    Yarn: 1.17.3 - ~/.nvm/versions/node/v12.6.0/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v12.6.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 28, 29
      Build Tools: 28.0.2, 28.0.3, 29.0.1
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6
    react-native: 0.60.5 => 0.60.5
  npmGlobalPackages:
    react-native-cli: 2.0.1

Steps To Reproduce

  1. react-native init
  2. Comment out signingConfig signingConfigs.debug from release buildType
  3. cd android && ./gradlew bundleRelease -Pandroid.injected.signing.store.file='app/debug.keystore' -Pandroid.injected.signing.store.password='android' -Pandroid.injected.signing.key.alias='androiddebugkey' -Pandroid.injected.signing.key.password='android'

Describe what you expected to happen:
It to build successfully as it does with ./gradlew bundleRelease when signing config is provided in the build gradle.

Fastlane uses the -P flag in its build_android lane and so this is currently preventing people from being able to automatically handle signing in fastlane for android builds.

Thanks in advance for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugStaleThere has been a lack of activity on this issue and it may be closed soon.Tech: Bundler 📦This issue is related to the bundler (Metro, Haul, etc) used.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions