Skip to content

Fix test#173

Open
ncalexan wants to merge 3 commits into
masterfrom
fix-test
Open

Fix test#173
ncalexan wants to merge 3 commits into
masterfrom
fix-test

Conversation

@ncalexan

Copy link
Copy Markdown
Member

No description provided.

emakryo and others added 3 commits July 23, 2026 12:01
Gradle 9 removed several deprecated APIs that this plugin relied on.
This commit updates the plugin to use the new APIs and modernizes the
build configuration to support the changes.

1. Core API Changes (Gradle 9 removals)

- Replace `fileMode = 493` with `filePermissions { unix("rwxr-xr-x") }`
  The CopySpec.fileMode property was deprecated in Gradle 8 and removed
  in Gradle 9. The new filePermissions API provides the same functionality.

- Replace `project.exec {}` with injected `ExecOperations.exec {}`
  The Project.exec() method was deprecated in Gradle 7.5 and removed in
  Gradle 9. Tasks must now use service injection to obtain ExecOperations.
  This requires changing task classes from `open class` to `abstract class`.

2. Build Configuration Updates

These changes are required because the new Gradle 9 APIs (filePermissions,
ExecOperations) are only available in Gradle 8.3+, so we must compile
against a newer Gradle version:

- Gradle wrapper: 7.1.1 → 8.5
  Required to compile against the new APIs (filePermissions added in 8.3)

- Kotlin: 1.3.50 → 1.9.22
  The old Kotlin Gradle plugin uses APIs removed in Gradle 8.x

- AGP: 4.0.1 → 8.2.0
  Required for Gradle 8.5+ compatibility

- Java target: 1.8 → 17
  Required by both Gradle 8.5+ and AGP 8.x

- plugin-publish: 0.14.0 → 1.2.1
  The old version uses the `pluginBundle {}` DSL which was removed.
  Metadata (website, vcsUrl, tags) now goes in `gradlePlugin {}` block.

- Add Guava dependency
  Versions.groovy uses Guava collections which were previously provided
  transitively by AGP 4.x but are no longer included in AGP 8.x.

- Add `null` branch to `when` expression in CargoBuildTask
  Kotlin 1.7+ requires exhaustive `when` for sealed classes with
  nullable types.

3. Test Matrix Updates

- Updated supportedVersions to test AGP 8.x with Gradle 8.x
- Updated jdkVersionFor() to use Java 17 for AGP 8.x

Fixes #160
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.

3 participants