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

Upgrade gradle 8.6 #1145

Closed
jvalkeal opened this issue Mar 14, 2024 · 5 comments
Closed

Upgrade gradle 8.6 #1145

jvalkeal opened this issue Mar 14, 2024 · 5 comments
Assignees
Milestone

Comments

@jvalkeal
Copy link
Contributor

No description provided.

@jvalkeal jvalkeal added this to the 4.0.1 milestone Mar 14, 2024
@jvalkeal jvalkeal self-assigned this Mar 14, 2024
jvalkeal added a commit that referenced this issue Mar 14, 2024
- Breaking change in artifactory plugin with gradle 8.x
  which mean we need to go back to maven publish instead
  of relying archives configuration.
- Relates #1145
@jvalkeal
Copy link
Contributor Author

Reopen as we probably need to revert back to gradle 7.6.x due to weird issues with signing plugin.

@jvalkeal jvalkeal reopened this Mar 15, 2024
jvalkeal added a commit that referenced this issue Mar 15, 2024
This reverts commit 362e5f0.

Going back to gradle 7.6.x due to signing issue happening
with #1145.
@jvalkeal jvalkeal modified the milestones: 4.0.1, 4.0.x Mar 15, 2024
@jvalkeal
Copy link
Contributor Author

Essentially with gradle 8.6 we get:

Note, you need env variables ORG_GRADLE_PROJECT_signingKey and ORG_GRADLE_PROJECT_signingPassword to point to valid credentials for signing attempt to happen.

> Task :spring-statemachine-core:signMavenJavaPublication FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':spring-statemachine-core:signMavenJavaPublication' (type 'Sign').
  - In plugin 'org.gradle.plugins.signing.SigningPlugin$Inject' type 'org.gradle.plugins.signing.Sign' property 'generatorsByKey./home/jvalkealahti/repos/spring/spring-statemachine/main/spring-statemachine-core/build/classes/java/main.toSign' file '/home/jvalkealahti/repos/spring/spring-statemachine/main/spring-statemachine-core/build/classes/java/main' is not a file.
    
    Reason: Expected an input to be a file but it was a directory.
    
    Possible solutions:
      1. Use a file as an input.
      2. Declare the input as a directory instead.

When looking older gradle versions 8.2 is a first one to show this issue. 8.1 was still ok. Signing logic in buildSrc was copied from spring-security which is using 8.6 without issues meaning it's something else in a statemachine build causing it.

@jvalkeal
Copy link
Contributor Author

When trying to debug behaviour I noticed that modifying:

public void execute(PublishAllJavaComponentsPlugin publishingPlugin) {
PublishingExtension publishing = project.getExtensions().findByType(PublishingExtension.class);
Publication maven = publishing.getPublications().getByName("mavenJava");
signing.sign(maven);
}

Just by adding call to getPublishableArtifacts() in a DefaultMavenPublication makes this issue go away. Internally it calls DefaultMavenPublication.populateFromComponent() which does something.

public void execute(PublishAllJavaComponentsPlugin publishingPlugin) {
	PublishingExtension publishing = project.getExtensions().findByType(PublishingExtension.class);
	Publication maven = publishing.getPublications().getByName("mavenJava");
	if (maven instanceof DefaultMavenPublication p) {
		PublicationArtifactSet<MavenArtifact> publishableArtifacts = p.getPublishableArtifacts();
	}
	signing.sign(maven);
}

@jvalkeal
Copy link
Contributor Author

This test key was created by gpg --output public.pgp --armor --export [email protected] with password passwordD1

-----BEGIN PGP PRIVATE KEY BLOCK-----

lQWGBGXcvboBDADAhY+9Q+khdsoiAw+GTHFZGQG7PEHWxu4WjTYQAfV37Ld6cNKd
2QDdwY/vdWESuh7IbmXM6sE39dX7JH9IktitKO0FMoWCNTBmJA89XJNgz+jmkVX8
OiHYxmZwR9yIS+583ENU+D4T3pP9dTqDd6CsnZNnGRCqEEaY3Hw/YI8ZdYFi6oO/
QtwunyW7WmLKmplSQ5ovPluGQ/xYwdDf3eipXKkpOUCHCPMJ8Gm6VnPb+ystKsXp
MjFoozYy3YRvHZF/XEZkzzyDb8UZxOk+Z/tX4+WtWIXO+YR7qUz1HyLaKIDnrbAs
wp/QM4VrWhnJJqeuM0kDj6+7vupnpMzUB7IPWfebw16yTtVZBVZa2jLstF9Bt6gr
EarwHKcF5ht8E7RGfwCFt+nE2i/kgkGg+qcelULGtJEePqUiNYHfH9GiqRTlYWYa
uI1ISI11JTf4OiL838rlxIJnbLO9NnsI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1NJo9zIl5VJx
Ag6B81AZSDU+YPkNBVnKRlPCqBVXIVeIl+zULwKTkqtHSsRkyRgOyaUwD4DeizSw
UShKwQvpXhuR4ATc1o9BC6VR1oDu9Vk71I+ka9CTYoRqCGadiDVA4pR7IxEeYuzL
wl++8wIDyaqNRRX86BxqOdjDgobO9aFgjuHiIXFEShyWkzCgq4fPDBuxuEGlpz85
WvMLJAqLp6urEsIVVPqmnF4fkmUb/8UKXmGX26LPC5FA3WUlUBpv08ND9GzihXfl
pFdzZh0knM/V0Ersnw8EXiuzqiNMZDgcr/H9M81Qfw0C2N+/YdkI
=V3bG
-----END PGP PRIVATE KEY BLOCK-----

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

No branches or pull requests

1 participant