Skip to content

Conversation

countableSet
Copy link
Owner

@countableSet countableSet commented Feb 8, 2025

Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 10.0. This API is incompatible with the configuration cache, which will become the only mode supported by Gradle in a future release. Consult the upgrading guide for further information: https://docs.gradle.org/8.12/userguide/upgrading_version_7.html#task_project

Removes instances of project. in task class SemanticVersionTask and instead injects or using input to access stuff now.

@Input
lateinit var extension: PublishingExtension
@Input
lateinit var tasks: TaskCollection<PublishToMavenRepository>
@get:Inject
abstract val dependencyService: DependencyManagementServices

DependencyManagementServices for dependency look up
before

val dep = project.dependencies.create(group = publication.groupId, name = publication.artifactId, version = versionSearch)

after

val handler = dependencyService.newDetachedResolver(StandaloneDomainObjectContext.ANONYMOUS).dependencyHandler
val dep = handler.create(group = publication.groupId, name = publication.artifactId, version = versionSearch)

The new inject methods with DependencyManagementServices seems to now required gradle version 8.11+ to work. So now that is the minimum supported version.

Since now PublishingExtension is passed from the plugin, the plugin needs to be configured in every project that wants to use it, not just projects that have publishing defined. As a consequence you might need to apply the plugin on projects you didn't have to previously.

in gradle 8.13 ModuleComponentRepositoryAccess interface changed parameters, and not will only support 8.13+
8.13

void listModuleVersions(ModuleComponentSelector selector, ComponentOverrideMetadata overrideMetadata, BuildableModuleVersionListingResolveResult result);

8.12

void listModuleVersions(ModuleDependencyMetadata dependency, BuildableModuleVersionListingResolveResult result);

other changes include

  • removal of asciidocs in favor or markdown and remove cloudflare pages and website
  • add development docs

cc #6

This comment was marked as resolved.

@countableSet countableSet merged commit 8b2f634 into main Mar 6, 2025
3 checks passed
@countableSet countableSet deleted the project branch March 6, 2025 23:41
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.

2 participants