Skip to content

Upgrade build to Gradle 2.5 for JDK 9 support [SPR-13012] #17603

Closed

Description

@spring-projects-issues

Sam Brannen opened SPR-13012 and commented

Overview

Gradle 2.5 aims to support JDK 1.9.

In fact, the Gradle 2.5 nightly build already supports building spring-test (and presumably the rest of the spring-framework) against JDK 1.9.

For details, see the comments from Adrian Kelly on the Gradle Forums.


Update from Luke Daley -- May 12, 2015

To be clear, it's not quite guaranteed that 2.5 works flawlessly with Java 9. We are making steps towards this; how far we get remains to be seen.

At this time we won't be doing a point release of 2.4. You could try using the http://gradle.org/nightly2 build in the interim.

We are looking to issue the first RC of 2.5 in the next two-ish weeks.


Affects: 4.2 RC2

Issue Links:

Referenced from: commits 2577ac3, c1b5262, 48f330d

Activity

  1. spring-projects-issues commented on Jul 8, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Gradle 2.5 is GA now... Let's upgrade in time for Spring 4.2 GA still!

    Juergen

  2. spring-projects-issues commented on Jul 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    OK. I'm checking it out now...

  3. spring-projects-issues commented on Jul 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Initial attempt to build against Java 9 (build 1.9.0-ea-b70) with Gradle 2.5 fails (on my Mac) due to issues with AspectJ:

    :spring-aspects:compileJava
    [ant:iajc] /Users/sbrannen/source/spring-framework/spring-aspects/src/main/java/org/springframework/transaction/aspectj/JtaAnnotationTransactionAspect.aj [error] The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
    [ant:iajc] (no source information available)
    [ant:iajc] /Users/sbrannen/source/spring-framework/spring-aspects/src/main/java/org/springframework/transaction/aspectj/JtaAnnotationTransactionAspect.aj:48 [error] The hierarchy of the type JtaAnnotationTransactionAspect is inconsistent
    [ant:iajc] public aspect JtaAnnotationTransactionAspect extends AbstractTransactionAspect {
    [ant:iajc]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [ant:iajc]
    [ant:iajc] 2 errors
    :spring-aspects:compileJava FAILED
    

    However, this is farther than the build was getting with Java 9 using Gradle 2.4. So it now appears that Gradle itself might work with Java 9.

  4. spring-projects-issues commented on Jul 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    The build against Java 8 with Gradle 2.5 just passed locally. So I'll go ahead and commit the upgrade to 2.5.

    However, I'll leave this issue open in order to address issues with AspectJ + Java 9 + Gradle.

  5. spring-projects-issues commented on Jul 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Upgraded to Gradle 2.5 in GitHub commit c1b5262.

  6. spring-projects-issues commented on Jul 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    We downgraded AspectJ to 1.8.x when the build didn't work on JDK 9 anyway...

    So I suppose we just need to upgrade it to AspectJ 1.9.0 beta 1 again, and all will be good :-) I'll do that tomorrow.

    Juergen

  7. spring-projects-issues commented on Jul 13, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    We're using AspectJ 1.9 beta 1 again now.

    I've also upgraded plenty of dependencies to recently released versions, in time for our 4.2 RC3.

    Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: task

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions