intent-intercept icon indicating copy to clipboard operation
intent-intercept copied to clipboard

Upgrade to Gradle 8 / AGP 8 / Java 17

Open TWiStErRob opened this issue 2 years ago • 2 comments
trafficstars

Would you accept a PR?

TWiStErRob avatar Aug 26 '23 17:08 TWiStErRob

Would you accept a PR?

I am not shure What will be the benefit of the upgrade? Will Java17 be still compatible with android-4.2 ?

k3b avatar Aug 29 '23 15:08 k3b

Some things that immediately come to mind, there's probably more:

What will be the benefit of the upgrade?

  • Being able to easily use the latest Android SDK APIs.
  • Being able to easily use the latest tools.
  • Potentially use Java 8 features (lambdas), or Kotlin if wanted.
  • Ability to provide support for intents added in newer versions (e.g. https://developer.android.com/sdk/api_diff/34/changes/android.content.Intent)
  • Being able to upgrade to newer libraries (ones which have compileSdk=34) with stable tooling. e.g. solve
    https://github.com/k3b/intent-intercept/blob/23ce4bd4e0e2345c058e2c57415b030b8930ad8d/app/build.gradle#L48
  • Faster builds from AGP and Gradle improvements

Will Java17 be still compatible with android-4.2 ?

  • Yes, it should be compatible. dex/art doesn't care what's the JVM running unit tests and Gradle builds, only what's the bytecode generated (source/target).
  • AGP 8 requires Java 17, but still provides minSdk=14 (and probably lower) tooling too (AndroidX is built with it after all).

TWiStErRob avatar Aug 29 '23 17:08 TWiStErRob