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

Incompatibility with JDK 16 #658

Closed
Toffikk opened this issue Apr 8, 2021 · 9 comments · Fixed by #657
Closed

Incompatibility with JDK 16 #658

Toffikk opened this issue Apr 8, 2021 · 9 comments · Fixed by #657
Milestone

Comments

@Toffikk
Copy link
Contributor

Toffikk commented Apr 8, 2021

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version

6.1.0

Gradle Version

7.0-rc-2

Expected Behavior

The task shadowjar working when using JDK 16 , works when using JDK 15

Actual Behavior

It failes

The stacktrace: https://gist.github.com/tofikarz/0b3ae6e45316bbc825acb3d175677ed1

@m8nmueller
Copy link
Contributor

Hi, this is fixed in #655 which will come with Shadow version 6.2.0

@Toffikk
Copy link
Contributor Author

Toffikk commented Apr 8, 2021

When it will be released? and is it possible to use the snapshot builds? if yes then how?

@m8nmueller
Copy link
Contributor

I don't know the release date but you can clone the repository and build it yourself.
Just add something like

repositories {
    maven {
       name = 'buildRepo'
       url = "file://${buildDir}/repo"
   }
}

to the publishing block in gradle/publish.gradle and build with gradle publishPluginPublicationToBuildRepoRepository.

One more thing: I don't know why but it seems that Oracle has changed their API URL (javadoc task failing with javadoc: error - Error fetching URL: http://docs.oracle.com/javase/1.7.0/docs/api/). I could at least silence that error by changing the javaApiUrl in gradle/docs.gradle from http://docs.oracle.com/javase/1.7.0/docs/api to http://docs.oracle.com/javase/7/docs/api.

You can apply the locally built plugin with:

buildscript {
  repositories {
    maven {
      url "file:///path/to/shadow/build/repo/"
    }
  }
  dependencies {
    classpath "com.github.jengelman.gradle.plugins:shadow:6.2.0-SNAPSHOT"
  }
}
apply plugin: "com.github.johnrengelman.shadow"

@m8nmueller
Copy link
Contributor

And if you want to build the plugin with Gradle 7, you'll have to wait for #657 to be merged, apply that patch manually or clone from my master branch.

@t3rmian
Copy link

t3rmian commented Apr 10, 2021

Alternatively, you can use Gradle 6.8.3 with JDK 16 by configuring Java Toolchain.

@pacher
Copy link

pacher commented Apr 10, 2021

+1
Gradle 7 is released. Would be really great to get some info on when Shadow 6.2.0 is planning to be released or how to get snapshot builds.

@pacher
Copy link

pacher commented Apr 12, 2021

@MaxM123 As an alternative to building locally, is it possible to use jitpack.io to install shadow snapshot from your master until 6.2.0 is released?

@m8nmueller
Copy link
Contributor

m8nmueller commented Apr 12, 2021

Good idea. Worked for me by adding the following to settings.gradle:

buildscript {
  repositories {
    gradlePluginPortal()
    maven {
      url 'https://jitpack.io'
    }
  }

  dependencies {
    classpath 'com.github.maxm123:shadow:master-SNAPSHOT'
  }
}

and apply plugin: 'com.github.johnrengelman.shadow' to build.gradle.

@fcurts
Copy link

fcurts commented Apr 16, 2021

You could do us a big favor by releasing the fix for this issue, which blocks us from testing our project against JDK 16 on CI. jitpack.io is not an option for us (blocked).

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 a pull request may close this issue.

6 participants