Skip to content

Conversation

@oguzkocer
Copy link
Contributor

@oguzkocer oguzkocer commented Oct 7, 2021

This PR updates Gradle to 7.1.1 and Android Gradle Plugin to 4.2.2 which matches our major libraries & clients. Here are a few changes that were made as part of this change:

  • Added plugin DSL support which is something we have been adding to all our projects
  • Removes enableUnitTestBinaryResources from gradle.properties flag in d9927bd which Gradle said is not supported - and didn't make a difference
  • Removes unnecessary buildToolsVersion in fc6eb05 as it's now part of Android Gradle Plugin and has been stripped from our build files for other projects for some time
  • Upgrades Kotlin to match current WPAndroid and fixes a couple very minor lint errors in 0b0a07d - I could have upgraded the Kotlin version to the latest, but there were more lint errors and I didn't want to muddy the PR too much with Kotlin changes
  • Updates Robolectric version to 4.4 which matches current WPAndroid and fixes an issue with the build f73f1f0
  • Updates targetSdkVersion to 29 - this was a necessary change to get the library building with the other changes. We probably want to upgrade it to 30 to match the latest changes in other projects. @ravishanker Could you take a look at that since you have recently worked on this? I am not sure if there is anything that needs to be changed in the library to support that change. This is the only change I am a little bit worried about as I don't have enough knowledge/experience about target sdk changes.
  • Git ignores .idea/compiler.xml which is something we have done a while back for other projects

These changes were made with the major goal of supporting composite builds, and minor goal of bringing the library up to speed with other projects. As always, there is still more to be improved.

To test:
Follow the test instructions in wordpress-mobile/WordPress-Android#15432

@oguzkocer oguzkocer marked this pull request as ready for review October 7, 2021 20:22
@oguzkocer oguzkocer requested review from a team and ravishanker October 7, 2021 20:23
@oguzkocer oguzkocer marked this pull request as draft October 7, 2021 20:54
@oguzkocer oguzkocer requested a review from mchowning October 7, 2021 20:55
build.gradle Outdated
dependencies {
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
commonTargetSdkVersion = 29
Copy link
Contributor

@ravishanker ravishanker Oct 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump it up to 30, given everything else is upgraded now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravishanker I've left a note for you in the PR description about this:

Updates targetSdkVersion to 29 - this was a necessary change to get the library building with the other changes. We probably want to upgrade it to 30 to match the latest changes in other projects. @ravishanker Could you take a look at that since you have recently worked on this? I am not sure if there is anything that needs to be changed in the library to support that change. This is the only change I am a little bit worried about as I don't have enough knowledge/experience about target sdk changes.

Unfortunately your comment is not clear enough to tell whether you've read the PR description or if there is anything to be considered for upgrading this library's targetSdkVersion.

@mchowning
Copy link
Contributor

Just bringing a discussion from Slack to here. Before merging this we should ensure that we can still generate artifacts for this library. Currently, we're using Jitpack for that, but the build from this PR failed.

You mentioned that you might go ahead and just migrate this from jitpack to s3, which sounds like a fine solution to me. Of course, fixing the Jitpack issue is also fine, but if the migration isn't too hard it might be easier to maintain in the future. No strong preferences from my end though.

@oguzkocer oguzkocer marked this pull request as ready for review October 14, 2021 17:23
Copy link
Contributor

@mchowning mchowning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, and with your other PR moving us from jitpack to S3, publishing shouldn't be a problem either.

@oguzkocer oguzkocer merged commit 3c76c2d into develop Oct 14, 2021
@oguzkocer oguzkocer deleted the upgrade-gradle-to-7.1.1-agp-to-4.2.2 branch October 14, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants