Update in response to feedback
This commit is contained in:
parent
afea5b64a1
commit
09d8031c6c
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -22,6 +22,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: validate gradle wrapper
|
||||||
|
uses: gradle/wrapper-validation-action@v1
|
||||||
- name: setup jdk ${{ matrix.java }}
|
- name: setup jdk ${{ matrix.java }}
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
@ -31,3 +33,9 @@ jobs:
|
|||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
- name: build
|
- name: build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
- name: capture build artifacts
|
||||||
|
if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Artifacts
|
||||||
|
path: build/libs/
|
||||||
|
16
.github/workflows/validate-gradle-wrapper.yml
vendored
16
.github/workflows/validate-gradle-wrapper.yml
vendored
@ -1,16 +0,0 @@
|
|||||||
# Ensure the gradle wrapper in the repository has not been tampered with.
|
|
||||||
# If this check fails, something is seriously wrong -- try creating a new
|
|
||||||
# wrapper from a local gradle install.
|
|
||||||
|
|
||||||
name: validate gradle wrapper
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: validate gradle wrapper
|
|
||||||
uses: gradle/wrapper-validation-action@v1
|
|
26
build.gradle
26
build.gradle
@ -38,12 +38,12 @@ tasks.withType(JavaCompile).configureEach {
|
|||||||
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
||||||
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
||||||
// We'll use that if it's available, but otherwise we'll use the older option.
|
// We'll use that if it's available, but otherwise we'll use the older option.
|
||||||
def targetVersion = JavaVersion.VERSION_1_8
|
def targetVersion = 8
|
||||||
if (JavaVersion.current().isJava9Compatible()) {
|
if (JavaVersion.current().isJava9Compatible()) {
|
||||||
it.options.release = targetVersion.ordinal() + 1
|
it.options.release = targetVersion
|
||||||
} else {
|
} else {
|
||||||
it.sourceCompatibility = targetVersion
|
it.sourceCompatibility = JavaVersion.toVersion(targetVersion)
|
||||||
it.targetCompatibility = targetVersion
|
it.targetCompatibility = JavaVersion.toVersion(targetVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ java {
|
|||||||
|
|
||||||
jar {
|
jar {
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${project.name}"}
|
rename { "${it}_${project.archivesBaseName}"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,19 +74,9 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// select the repositories you want to publish to
|
// Select the repositories you want to publish to
|
||||||
// to just publish to maven local, no extra repositories are necessary. Just use the task `publishToMavenLocal`.
|
// To publish to maven local, no extra repositories are necessary. Just use the task `publishToMavenLocal`.
|
||||||
repositories {
|
repositories {
|
||||||
// An example of a standard Nexus setup, for those wishing to publish their mod artifacts
|
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||||
// maven {
|
|
||||||
// if (project.version.endsWith("-SNAPSHOT")) {
|
|
||||||
// url = "https://nexus.myorganization.org/repository/maven-snapshots/"
|
|
||||||
// } else {
|
|
||||||
// url = "https://nexus.myorganization.org/repository/maven-releases/"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// name = "myRepo"
|
|
||||||
// credentials(PasswordCredentials) // use the ${name}Username and ${name}Password properties for authentication
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user