breautek opened a new pull request, #1678:
URL: https://github.com/apache/cordova-android/pull/1678

   <!--
   Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist is intended as a quick reference, for complete details please 
see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   
   Android
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   Adds in support for the next android platform
   
   Closes https://github.com/apache/cordova-android/issues/1661
   
   ### Description
   <!-- Describe your changes in detail -->
   
   This PR does a few different things to provide API 34 support which will be 
noted below.
   
   #### Default Configuration Changes
   
   Target SDK: 34
   Gradle Version: 8.4
   AGP Version: 8.2.0-rc1 (this pr will remain a draft until AGP 8.2 is fully 
released)
   Min Build Tools: 34
   
   #### Java Changes
   
   Source/Target compatibility we changed from Java 8 to 17 on both the 
framework and app template projects.
   
   #### BuildConfig
   
   Previously this I believe was implicitly enabled, but now needs to be 
explictly enabled otherwise the following may occur
   
   ```
   * What went wrong:
   A problem occurred configuring project ':app'.
   > com.android.builder.errors.EvalIssueException: defaultConfig contains 
custom BuildConfig fields, but the feature is disabled.
     To enable the feature, add the following to your module-level build.gradle:
     `android.buildFeatures.buildConfig true`
   ```
   
   I however did encounter this on a simple project, so it might be required 
depending on what the plugins does.
   
   #### AGP 8.2
   
   This is the minimum version required for API 34 builds. Attempting build 
against API 34 on earlier versions will produce warnings and/or errors.
   
   #### Gradle `-b` flag
   
   This flag has been deprecated and scheduled to be removed in gradle's next 
major release.
   The gradle projects must follow a standard structure now. Cordova's 
generated project already follows the standard structure thus for `cordova 
build` commands the `-b` append can simply just be removed, we don't need to 
explicitly declare the `build.gradle` file.
   
   It was also used against the `wrapper.gradle` file which changes are noted 
below.
   
   #### gradle.wrapper
   
   The "intentionally empty" gradle.wrapper file has been removed.
   
   We no longer manually manage gradle versions. Instead, we let gradle do it 
for us by utilising their `--gradle-version` argument. A new function was 
introduced to replace the old `runGradleWrapper` to:
   
   1. setup the gradle wrapper if not already present
   2. install/update the gradle wrapper to the specified version.
   
   By default, this will be `8.4` as defined in the defaults json config file, 
but may be overwritten by `GradleVersion` preference, or 
`CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL` environment variable.
   
   If `CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL` is defined, the preference will 
be ignored and `--distribution-url` will be used instead, maintaining the 
ability for corporations to install their own gradle wrapper from their own 
source.
   
   #### CI
   
   JDK was updated from 11 to 17, which is a requirement to build for API 34
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   Ran NPM test
   Ran in sample cordova hello world app
   Ran in one of my projects
   
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [x] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to 
one platform (e.g. `(android)`)
   - [x] If this Pull Request resolves an issue, I linked to the issue in the 
text above (and used the correct [keyword to close issues using 
keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to