4 Commits

Author SHA1 Message Date
actuallyasmartname
62a3d3ce3b Update Gradle to 7.0, Bump CI stuff (#95)
* Update Gradle to 7.0, other stuff

* Update build.yml

* Change to adopt, Revert stuff

* Update gradle.properties

* Update gradle.properties

* 7.0.2 gradle
2021-05-15 11:29:25 +01:00
David Bailey
29c522536f Update dependencies (#92)
Co-authored-by: ByMartrixX <47987888+ByMartrixx@users.noreply.github.com>
2021-03-27 20:04:16 +00:00
Geolykt
bdfab7a0cf Unify inconsitent identation in build.gradle (#90) 2021-03-15 19:14:43 +00:00
modmuss50
4cccd73df9 Update loom, gradle, yarn, loader and api. 2021-02-26 22:04:17 +00:00
4 changed files with 30 additions and 34 deletions

View File

@@ -12,9 +12,9 @@ jobs:
matrix: matrix:
# Use these Java versions # Use these Java versions
java: [ java: [
1.8, # Minimum supported by Minecraft 8.0, # Minimum supported by Minecraft
11, # Current Java LTS 11, # Current Java LTS
15 # Latest version 16 # Latest version
] ]
# and run on both Linux and Windows # and run on both Linux and Windows
os: [ubuntu-20.04, windows-latest] os: [ubuntu-20.04, windows-latest]
@@ -25,8 +25,9 @@ jobs:
- name: validate gradle wrapper - name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1 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@v2
with: with:
distribution: adopt
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
- name: make gradle wrapper executable - name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }} if: ${{ runner.os != 'Windows' }}

View File

@@ -1,22 +1,21 @@
plugins { plugins {
id 'fabric-loom' version '0.5-SNAPSHOT' id 'fabric-loom' version '0.7-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.archives_base_name archivesBaseName = project.archives_base_name
version = project.mod_version version = project.mod_version
group = project.maven_group group = project.maven_group
// This field defines the Java version your mod target.
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too.
def targetJavaVersion = 8
repositories { repositories {
// Add repositories to retrieve artifacts from in here. // Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because // You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html // See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories. // for more information about repositories.
} }
dependencies { dependencies {
@@ -27,9 +26,6 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// You can also use individual Fabric API modules with
// `modImplementation fabricApi.module('module-name', project.fabric_version)`
// If you do this, you will need to depend individually on each modules in the fabric.mod.json file.
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them. // You may need to force-disable transitiveness on them.
@@ -50,17 +46,16 @@ tasks.withType(JavaCompile).configureEach {
// If Javadoc is generated, this must be specified in that task too. // If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8" it.options.encoding = "UTF-8"
// 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 = 8
if (JavaVersion.current().isJava9Compatible()) { if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetJavaVersion it.options.release = targetVersion
} }
} }
java { java {
sourceCompatibility = JavaVersion.toVersion(targetJavaVersion)
targetCompatibility = JavaVersion.toVersion(targetJavaVersion)
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present. // if it is present.
// If you remove this line, sources will not be generated. // If you remove this line, sources will not be generated.
@@ -86,12 +81,12 @@ publishing {
} }
} }
} }
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories { repositories {
// Add repositories to publish to here. // Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level. // Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for // The repositories here will be used for publishing your artifact, not for
// retrieving dependencies. // retrieving dependencies.
} }
} }

View File

@@ -2,10 +2,10 @@
org.gradle.jvmargs=-Xmx1G org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/versions.html
minecraft_version=1.16.5 minecraft_version=1.16.5
yarn_mappings=1.16.5+build.1 yarn_mappings=1.16.5+build.9
loader_version=0.11.0 loader_version=0.11.3
# Mod Properties # Mod Properties
mod_version = 1.0.0 mod_version = 1.0.0
@@ -13,5 +13,5 @@ org.gradle.jvmargs=-Xmx1G
archives_base_name = fabric-example-mod archives_base_name = fabric-example-mod
# Dependencies # Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api (or https://fabricmc.net/versions.html)
fabric_version=0.29.3+1.16 fabric_version=0.34.2+1.16

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists