Gradle version support

When creating a new mobile app in Wappler ( at least on a MAC ), it quickly becomes necessary to upgrade gradle. The process today is to find 4.10.3 in the wappler project, and replace it with an updated version (today for example I used 6.1.1).

It would be great if there was a better way to manage this within Wappler.

It’s not a Wappler issue Ken it is an OS environmental variable controlled by the OS itself. Wappler uses the Gradle version your OS is providing. You need to update Gradle at an OS level, this will then reflect within your Wappler project.

All the instructions necessary are here:

Thanks Dave…

brew install is what I did months ago, but I’ve just upgraded to make sure.

gradle -v from os terminal gives: 6.5.1

Within Wappler, I create a blank project, add android platform and then attempt to build:

So I take a look at the gradle props of the project and find:

Then I move over to Android Studio, open the project to find this:
Screen Shot 2020-07-31 at 12.05.34 PM

So I go ahead and update:

which takes me to Gradle 6.1.1.

I build the project in Android Studio and all is well.

I go back to Wappler and try to build, but cannot because it still wants 4.10.3. If I replace all the 4.10.3 with 6.1.1…build in Wappler is good and I’m off to actually developing. :slight_smile:

What the heck am I missing?

I’d imagine you have rebooted? Could try opening the Android Project settings using the little cog button at the bottom, and saving. Maybe running the System Check tool too, might be better to do this first? Just quick ideas straight off the bat… Worth a go? Then shut down fully and open Wappler again…

Was a total pain in the arse on Windows. Need to build in Wappler first to update the Platform/Application folder with any changes before opening in Android Studio otherwise changes won’t be reflected when you build in Android Studio. Could certainly do with some updates in the Mobile area but all seems to be concentrated on Node right now so imagine we’ll have to wait a while Ken, and figure it out ourselves for now. See if the above helps and I’ll keep my fingers crossed for you!

Thanks for the ideas. Luckily it doesn’t stop me from working since I can manually get 'er going, I’m just highlighting here as a feature request. They’ll get to it–they always do. :slight_smile:

1 Like

We have so many workarounds to get the job done. I’m sure they’ll be some updates in the future. Feels like we have been waiting for a while. Can understand other things being implemented but the mobile app side really does need an update desperately. Manage certificates, sort out the Gradle issues, more control over plugins, maybe include a few of the basics like local storage, Firebase support, Push Notifications, allow for adding domains to the security policy etc. To us this has been slowly learned through trial and error but for others… Must be difficult!

2 Likes

I completely agree with you. Just don’t forget about improving the integration of Fw7. What we have now is difficult to call reasonable. With better integration, the speed of work on the project can be increased several times compared to the current one. Working with Fw7 in Wappler today is more like working with code ordinary. It’s like using some VS Code instead of a super efficient development environment with a visual interface called Wappler…

Where you exactly do the search and replace?
We don’t really do anything specific with gradle - it is just being used by Cordova

Hi George,

I perform the search/replace in Wappler.

I believe it relates to this issue:

Well seems more like a bug in Cordova, but the status is set as fixed. Maybe just update to the latest Cordova Android

We can’t just fix Cordova or do any automatic search and replaces. It should be just fixed in Cordova self.

True. This is fixed in the latest cordova android v9 and with cordova 10, this will be the default:

https://cordova.apache.org/announcements/2020/07/28/cordova-lib-release-10.0.0.html

1 Like

Good to know did you try Cordova 10 in Wappler? Any issues?

Not yet. Does an upgrade of Cordova impact ALL projects, or is that project specific like platforms/plugins?

Well Cordova is installed system wide but the you compile per project.

Yes, Cordova affects all projects. In this regard, the Capacitor is much more flexible. It is added to a specific project and there may be several projects with different versions of the capacitor. Perhaps in the future, Wappler will add support for the Capacitor.

2 Likes

I think I’ll wait for full release of Cordova 10…so far it is just the library not the actual package

Ya, that’s what I thought…I’m not yet in a place to upgrade cordova and break existing projects! I’ll let others lead the charge for now. :slight_smile:

1 Like

hello @mebeingken ,

could you try ;

  1. open build.gradle file under platforms > android
  2. change "classpath 'com.android.tools.build:gradle:3.0.1'" or classpath 'com.android.tools.build:gradle:3.1.0' (you will see it on row 31)
    then try

Thanks @s.alpaslan. Using Android 9 instead of 8 takes care of everything for me.

1 Like