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

Drop duplicate isSnapshot variable in Gradle build script #3413

Merged

Conversation

rybak
Copy link
Contributor

@rybak rybak commented Aug 5, 2023

Minor Gradle code cleanup.


I hereby agree to the terms of the JUnit Contributor License Agreement.

@sbrannen sbrannen requested a review from marcphilipp August 6, 2023 06:44
@sbrannen sbrannen changed the title Gradle: publishing: Drop duplicate isSnapshot variable Drop duplicate isSnapshot variable in Gradle build script Aug 6, 2023
@rybak rybak force-pushed the gradle-publishing-isSnapshot-dupe branch from ec67976 to 1e31b96 Compare August 6, 2023 12:36
@rybak
Copy link
Contributor Author

rybak commented Aug 6, 2023

Force-pushed to tweak the commit message and rebase on fresh main:

$ git range-diff ec67976285...1e31b96fa2
-:  ---------- > 1:  d932b92fea Fix broken links to Gradle docs about BOM
1:  ec67976285 ! 2:  1e31b96fa2 Gradle: publishing: Drop duplicate isSnapshot variable
    @@ Metadata
     Author: Andrei Rybak <[email protected]>
     
      ## Commit message ##
    -    Gradle: publishing: Drop duplicate isSnapshot variable
    +    Drop duplicate isSnapshot variable in Gradle build script
     
         Publishing conventions plugin calculates `isSnapshot`:
     

Publishing conventions plugin calculates `isSnapshot`:

    isSnapshot = project.version.toString().contains("SNAPSHOT")

twice:

  1. at the top of build script junitbuild.publishing-conventions.gradle.kts
  2. in configuration of `Sign` tasks.

Drop the second `val isSnapshot` to make `Sign` task configuration
re-use the variable from the top of the script.
@rybak rybak force-pushed the gradle-publishing-isSnapshot-dupe branch from 1e31b96 to fff2c41 Compare October 8, 2023 01:06
@rybak
Copy link
Contributor Author

rybak commented Oct 8, 2023

Rebased to get the latest fixes for the Java 22 builds, which failed in previous versions of this PR.

@sbrannen sbrannen added this to the 5.11 M1 milestone Oct 8, 2023
Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

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

Good catch!

@marcphilipp marcphilipp merged commit 2f75deb into junit-team:main Oct 13, 2023
13 checks passed
@rybak rybak deleted the gradle-publishing-isSnapshot-dupe branch October 13, 2023 11:39
sbrannen pushed a commit to sbrannen/junit5 that referenced this pull request Oct 30, 2023
…am#3413)

Publishing conventions plugin calculates `isSnapshot`:

    isSnapshot = project.version.toString().contains("SNAPSHOT")

twice:

  1. at the top of build script junitbuild.publishing-conventions.gradle.kts
  2. in configuration of `Sign` tasks.

Drop the second `val isSnapshot` to make `Sign` task configuration
re-use the variable from the top of the script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants