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

Update Gradle from 6.8.3 to 7.0 #7619

Merged
merged 50 commits into from
May 3, 2021
Merged

Update Gradle from 6.8.3 to 7.0 #7619

merged 50 commits into from
May 3, 2021

Conversation

koppor
Copy link
Member

@koppor koppor commented Apr 12, 2021

Update Gradle Wrapper from 6.8.3 to 7.0.

Read the release notes: https://docs.gradle.org/7.0/release-notes.html


The checksums of the Wrapper JAR and the distribution binary have been successfully verified.

  • Gradle release: 7.0
  • Distribution (-bin) zip checksum: eb8b89184261025b0430f5b2233701ff1377f96da1ef5e278af6ae8bac5cc305
  • Wrapper JAR Checksum: e996d452d2645e70c01c11143ca2d3742734a28da2bf61f25c82bdc288c9e637

You can find the reference checksum values at https://gradle.org/release-checksums/


🤖 This PR has been created by the Update Gradle Wrapper action.

Need help? 🤔

If something doesn't look right with this PR please file an issue here.

Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
@koppor koppor added dependencies Pull requests that update a dependency file gradle-wrapper Pull requests that update Gradle wrapper labels Apr 12, 2021
@Siedlerchr
Copy link
Member

@koppor
Copy link
Member Author

koppor commented Apr 12, 2021

Getting the same error locally:

koppor@DESKTOP-KAK953S c:\git-repositories\jabref\jabref
$ set JAVA_HOME=C:\Program Files\AdoptOpenJDK\jdk-14.0.2.12-hotspot

koppor@DESKTOP-KAK953S c:\git-repositories\jabref\jabref
$ gradlew jlink
Starting a Gradle Daemon, 1 busy and 2 incompatible Daemons could not be reused, use --status for details

> Configure project :
Project : => 'org.jabref' Java module

> Task :compileJava
Skipped patching fastparse_2.12-1.0.0.jar into test
Skipped patching fastparse-utils_2.12-1.0.0.jar into test2
Skipped patching sourcecode_2.12-0.1.4.jar into test3
C:\git-repositories\jabref\jabref\src\main\java\org\jabref\gui\search\rules\describer\GrammarBasedSearchRuleDescriber.java:16: error: package org.jabref.search does not exist
import org.jabref.search.SearchBaseVisitor;
                        ^
C:\git-repositories\jabref\jabref\src\main\java\org\jabref\gui\search\rules\describer\GrammarBasedSearchRuleDescriber.java:17: error: package org.jabref.search does not exist
import org.jabref.search.SearchParser;
                        ^
C:\git-repositories\jabref\jabref\src\main\java\org\jabref\gui\search\rules\describer\GrammarBasedSearchRuleDescriber.java:48: error: cannot find symbol
    private class DescriptionSearchBaseVisitor extends SearchBaseVisitor<List<Text>> {
                                                       ^
  symbol:   class SearchBaseVisitor
  location: class GrammarBasedSearchRuleDescriber

@koppor
Copy link
Member Author

koppor commented Apr 12, 2021

As "usual" the duplicate usage of JournalAbbreviationLoader causes troubles. (buildSrc/src/main/groovy/org/jabref/build/JournalAbbreviationConverter.groovy) - Maybe, we should copy the source of that file to buildSrc/gen during the build?

oppor@DESKTOP-KAK953S c:\git-repositories\jabref\jabref
$ gradlew generateSearchGrammarSource
> Task :buildSrc:jar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:jar'.
> Entry org/jabref/build/JournalAbbreviationConverter$_convert_closure1$_closure2.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.0/dsl/org.gradle.api.file.CopySpec.html#org.gradle.api.file.CopySpec:duplicatesStrategy for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s

@Siedlerchr
Copy link
Member

I think it's something with this incremental build. If you execute gradlew generateSource locally again than it works

* upstream/main:
  Squashed 'buildres/csl/csl-styles/' changes from e1acabe..c363e8f (#7630)
  Update apple (#7628)
  update to JabRef e.V. apple certs (#7626)
@Siedlerchr
Copy link
Member

maybe gradle/gradle#16409

@koppor koppor changed the title Update Gradle Wrapper from 6.8.3 to 7.0 Update Gradle from 6.8.3 to 7.0 May 2, 2021
koppor and others added 15 commits May 2, 2021 22:24
- Remove obsolete import org.gradle.work.DisableCachingByDefault
- Empty lines to make plugin id comments more readable
- Nicer Groovy code (= ;)

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
…adlew-update-7.0

* 'gradlew-update-7.0' of github.com:JabRef/jabref:
  Fix groovy
  Fix mavenCentral
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
…adlew-update-7.0

# Conflicts:
#	buildSrc/build.gradle
…ut as "src/"

src-gen/main/java instead of src/main/generated
outputs.dir("src/main/generated/org/jabref/logic/bst/")
args = ["-o", "$projectDir/src/main/generated/org/jabref/logic/bst/" , "$projectDir/src/main/antlr3/org/jabref/bst/Bst.g" ]
outputs.dir("src-gen/main/java/org/jabref/logic/bst/")
args = ["-o", "src-gen/main/java/org/jabref/logic/bst/" , "$projectDir/src/main/antlr3/org/jabref/bst/Bst.g" ]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
args = ["-o", "src-gen/main/java/org/jabref/logic/bst/" , "$projectDir/src/main/antlr3/org/jabref/bst/Bst.g" ]
args = ["-o", "$projectDir/src-gen/main/java/org/jabref/logic/bst/" , "$projectDir/src/main/antlr3/org/jabref/bst/Bst.g" ]

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not added to outputs.dir. To avoid cluttering the build.gradle file, I would leave this change out and "just" use the relative path. (And it works with the relative path).

I'll keep it in my head though.

outputs.dir("src/main/generated/org/jabref/search/")
args = ["-o","$projectDir/src/main/generated/org/jabref/search" , "-visitor", "-no-listener", "-package", "org.jabref.search", "$projectDir/src/main/antlr4/org/jabref/search/Search.g4"]
outputs.dir("src-gen/main/java/org/jabref/search/")
args = ["-o","src-gen/main/java/org/jabref/search" , "-visitor", "-no-listener", "-package", "org.jabref.search", "$projectDir/src/main/antlr4/org/jabref/search/Search.g4"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
args = ["-o","src-gen/main/java/org/jabref/search" , "-visitor", "-no-listener", "-package", "org.jabref.search", "$projectDir/src/main/antlr4/org/jabref/search/Search.g4"]
args = ["-o","$projectDir/src-gen/main/java/org/jabref/search" , "-visitor", "-no-listener", "-package", "org.jabref.search", "$projectDir/src/main/antlr4/org/jabref/search/Search.g4"]

@@ -394,7 +397,7 @@ compileJava {
options.compilerArgs << "-Xlint:none"
dependsOn "generateSource"

options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/main/generated")
options.annotationProcessorGeneratedSourcesDirectory = file("src-gen/main/java")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
options.annotationProcessorGeneratedSourcesDirectory = file("src-gen/main/java")
options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src-gen/main/java")

@koppor
Copy link
Member Author

koppor commented May 3, 2021

clean -> run/test works for me locally (IntelliJ/Mac OS X)

Strange thing -> on Windows, gradle executes the task buildSrc explicitely (and it is available). However, it is not available on WSL.

We decided to copy the .java classes into buildSrc to avoid confustion. We could also have added symlinks, but this is difficult on Windows.

@koppor
Copy link
Member Author

koppor commented May 3, 2021

Tested Windows build: runs

@calixtus
Copy link
Member

calixtus commented May 3, 2021

Since this PR has seen multiple authors, there is no chance to get an unbiased review. So we are merging this now, to move forward (and because all tests are green).

@calixtus calixtus merged commit 382bc70 into main May 3, 2021
@calixtus calixtus deleted the gradlew-update-7.0 branch May 3, 2021 21:35
Siedlerchr added a commit that referenced this pull request May 4, 2021
* upstream/main: (354 commits)
  Fix ScienceDirect fetcher (#7684)
  Refactor NoBibTexFieldCheckerTest to increase mutation coverage (#7697)
  Update Gradle from 6.8.3 to 7.0 (#7619)
  Fixes Jabref#7305: the RFC fetcher is not compatible with the draftFix for issue 7305 (#7674)
  Refactoring existing unit tests (#7693)
  cover boundary cases & add more unit tests (#7694)
  Bump classgraph from 4.8.104 to 4.8.105 (#7688)
  Bump java-diff-utils from 4.9 to 4.10 (#7692)
  Fix arXiv fetcher tests (#7686)
  Make key for ScienceDirect configurable (#7683)
  migration of timestamp (#7671)
  Fix CCSB and DOAJ (#7426)
  [Bot] Update CSL styles (#7680)
  MS Office XML: Export month name (#7677)
  linkfix (#7678)
  readd fix (#7675)
  Fix threading cleanup in performSearch (#7672)
  add missing changelog
  delete bug fix (#7580)
  Add more unit tests to three gui classes  (#7636)
  ...

# Conflicts:
#	build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file gradle-wrapper Pull requests that update Gradle wrapper status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants