Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionic repair hardwires android gradle build tools plugin to 3.3.0 #20988

Closed
nhhockeyplayer opened this issue Apr 7, 2020 · 4 comments
Closed
Labels

Comments

@nhhockeyplayer
Copy link

nhhockeyplayer commented Apr 7, 2020

IONIC REPAIR insisting hardwiring lower archetypes to build against android gradle build tools plugin to 3.3.0 ?

NOTES...
Just reinstalled android studio

to reset that

my ionic project pre-exists fine

when I perform ionic repair, ionic resets the android gradle build tools plugin from 3.6.2 back down to 3.3.0

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

        classpath 'com.android.tools.build:gradle:3.3.0'
    }
}

subsequent build fail

@ionitron-bot ionitron-bot bot added the triage label Apr 7, 2020
@liamdebeasi
Copy link
Contributor

Thanks for the issue. The ionic repair and ionic repair --cordova commands just remove the platforms and plugins and then restore them by performing a cordova prepare android and cordova prepare ios, so any resetting you are seeing is being done by Cordova and not Ionic.

If you want more control over the Android Studio project, you should look into using Capacitor and not Cordova. Capacitor makes the Android Studio project a source artifact rather than a build artifact, so once it is created you can change it as you desire, including the Gradle setup. For more information, please see http://capacitor.ionicframework.com/.

If you would prefer not to move to Capacitor, you might want to take a look at Cordova’s documentation on how to configure/extend Gradle: https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#configuring-gradle

I am going to close this as Ionic Framework does not control Cordova's project generation process.

@liamdebeasi
Copy link
Contributor

A few of my colleagues use VSCode and like it a lot https://code.visualstudio.com/.

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Apr 7, 2020

You can use the ionic capacitor run command to bundle your app and prepare for your deployment platform, but we do not currently support launching the project on a device yet via CLI: (https://ionicframework.com/docs/cli/commands/capacitor-run).

One of the main goals of Capacitor is to get away from all of the additional complex CLI tooling that Cordova has (which is likely the source of many of your Cordova frustrations such as the gradle.build customization). In a sense, when you develop with Capacitor you should expect to follow the same build process that native Swift or Java/Kotlin developers use.

One of our community members has a great guide on how to deploy to Android: https://www.joshmorony.com/deploying-capacitor-applications-to-android-development-distribution/.

Hope this helps!

@ionitron-bot
Copy link

ionitron-bot bot commented May 10, 2020

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators May 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants