fastlane-plugin-ionic icon indicating copy to clipboard operation
fastlane-plugin-ionic copied to clipboard

support bundle

Open NikolaMandic opened this issue 5 years ago • 9 comments

To support latest bundle requirement for google play store here is extra option added

NikolaMandic avatar Jan 01 '20 21:01 NikolaMandic

Is it possible to merge this pull request? App bundles will be mandatory for new apps starting from the second half of this year.

jappe999 avatar Feb 25 '21 11:02 jappe999

This would be a great option!

adamsteen avatar Mar 08 '21 01:03 adamsteen

On it!

joshdholtz avatar Mar 17 '21 13:03 joshdholtz

This PR is adding the --bundle parameter for build. Are you sure it's working as expected? Running the command ionic cordova build android --bundle still builds the apk file. Instead, the ionic cordova build android -- -- --packageType=bundle command should be used.

andrey3diq avatar Apr 01 '21 13:04 andrey3diq

yes either as @andrey3diq said or go into platforms folder and do gradle buildRelease it has to be changed

NikolaMandic avatar Apr 06 '21 12:04 NikolaMandic

Is there any documentation for ionic cordova build android --bundle? I can’t see this anywhere. I’m only seeing ionic cordova build android -- -- --packageType=bundle in any searches I do 🤷‍♂️

joshdholtz avatar Jul 12 '21 13:07 joshdholtz

Hi @joshdholtz --bundle is no valid argument as @andrey3diq mentioned. So the command you are using is the right one.

Here you see the Ionic v3 docs regarding Cordova builds: https://ionicframework.com/docs/v3/cli/cordova/build/

And here the cordova docs:

  • Android: https://cordova.apache.org/docs/en/10.x/guide/platforms/android/#using-flags
  • iOS: https://cordova.apache.org/docs/en/10.x/guide/platforms/ios/#using-flags

kevinboosten avatar Jul 28 '21 11:07 kevinboosten

Any solutions to this?

srtomus avatar Sep 20 '21 10:09 srtomus

In my current solution I make use of a build config file that specifies the packageType option:

{
  "android": {
    "release": {
      "packageType": "bundle"
    }
  }
}

This config file can be referenced using the cordova_build_config_file option, like so:

ionic(
  platform: 'android',
  prod: true,
  cordova_build_config_file: 'build_config.json',
)

Hope this helps!

jappe999 avatar Sep 20 '21 11:09 jappe999