Skip to content

Commit

Permalink
Quiet down the warning to one line on the task itself.
Browse files Browse the repository at this point in the history
Disable signing ourselves because gradle injects code into our package at runtime and it breaks signatures.
  • Loading branch information
LexManos committed Jul 29, 2023
1 parent d0ba2a2 commit d71878e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle_publish_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: 17
java-version: 8
distribution: 'adopt'
cache: gradle
- name: Build and Publish
Expand Down
5 changes: 1 addition & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
id 'java-gradle-plugin'
id 'eclipse'
id 'net.minecraftforge.gradleutils' version '2.0.11'
id 'net.minecraftforge.gradlejarsigner' version '1.0.0'
}

repositories {
Expand All @@ -15,7 +14,6 @@ repositories {
group = 'net.minecraftforge'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
java.withSourcesJar()
jarSigner.fromEnvironmentVariables()

license {
header project.file('LICENSE-header.txt')
Expand Down Expand Up @@ -51,10 +49,9 @@ jar {
'Implementation-Title': 'SimpleGradleJarSigner',
'Implementation-Version': project.version,
'Implementation-Vendor': 'Forge Development LLC'
] as LinkedHashMap, 'net/minecraftforge/GradleJarSigner/')
] as LinkedHashMap, 'net/minecraftforge/gradlejarsigner/')
}
}
jarSigner.sign(jar)

publishing {
publications {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,5 @@ private void set(String key, Consumer<String> prop) {
String data = System.getenv(key);
if (data != null)
prop.accept(data);
else
this.project.getLogger().warn("Missing " + key + " Environment Variable");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ private <T extends Task> void signSafe(T task) {
try {
if (hasEnoughInfo())
this.sign(task);
else
task.getLogger().warn("Jar will be unsigned, missing key information");
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit d71878e

Please sign in to comment.