Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle 8.1 #554

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Gradle 8.1 #554

merged 1 commit into from
Apr 12, 2023

Conversation

gabrielittner
Copy link
Collaborator

No description provided.

Comment on lines -496 to 502
if (GradleVersion.current() >= GradleVersion.version("8.1-rc-1")) {
if (GradleVersion.current() >= GradleVersion.version("8.1")) {
val extension = project.extensions.getByType(JavaPluginExtension::class.java)
val testFixturesSourceSet = extension.sourceSets.maybeCreate(variant)
val method = services.javaClass.getMethod("createJvmVariant", String::class.java, SourceSet::class.java, Action::class.java)
method.invoke(services, variant, testFixturesSourceSet, action)
services.createJvmVariant(variant, testFixturesSourceSet, action)
} else {
project.serviceOf<JvmModelingServices>().createJvmVariant(variant, action)
val method = services.javaClass.getMethod("createJvmVariant", String::class.java, Action::class.java)
method.invoke(services, variant, action)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just swapped which version does the direct method call and which uses reflection

@gabrielittner gabrielittner merged commit 5acae8c into main Apr 12, 2023
6 checks passed
@gabrielittner gabrielittner deleted the gradle-8.1 branch April 16, 2023 08:19
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.

None yet

2 participants