Skip to content

Commit

Permalink
Cleanup gradle config
Browse files Browse the repository at this point in the history
  • Loading branch information
Grayray75 committed Jul 25, 2023
1 parent ff21528 commit c44d4c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
23 changes: 11 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
plugins {
id 'fabric-loom' version "1.3-SNAPSHOT"
id 'legacy-looming' version "1.3-SNAPSHOT" // Version must be the same as fabric-loom's
id 'maven-publish'
id "fabric-loom" version "1.3-SNAPSHOT"
id "legacy-looming" version "1.3-SNAPSHOT" // Version must be the same as fabric-loom's
id "maven-publish"
}

version = project.mod_version
group = project.maven_group

repositories {
}
repositories {}

loom {
// Only needed for versions not available from vanilla launcher by default.
Expand All @@ -27,12 +26,12 @@ dependencies {
mappings(legacy.yarn(project.minecraft_version, project.yarn_build))
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API provides hooks for events, item registration, and more. As most mods will need this, it's included by default.
// Fabric API provides hooks for events, item registration, and more. As most mods will need this, it's included by default.
// If you know for a fact you don't, it's not required and can be safely removed.
modImplementation ("net.legacyfabric.legacy-fabric-api:legacy-fabric-api:${project.fabric_version}")
modImplementation "net.legacyfabric.legacy-fabric-api:legacy-fabric-api:${project.fabric_version}"

// You can retrieve a specific api module using this notation.
// modImplementation(legacy.apiModule("legacy-fabric-item-groups-v1", project.fabric_version))
// modImplementation(legacy.apiModule("legacy-fabric-item-groups-v1", project.fabric_version))
}

base {
Expand All @@ -47,7 +46,7 @@ processResources {
}
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// Ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile).configureEach {
Expand All @@ -71,17 +70,17 @@ jar {
}
}

// configure the maven publication
// Configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// select the repositories you want to publish to
// Select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// Uncomment to publish to the local maven
// mavenLocal()
}
}
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G


# More versions available at: https://grayray75.github.io/LegacyFabric-Versions/
# Fabric Properties
# More versions available at: https://grayray75.github.io/LegacyFabric-Versions/
minecraft_version = 1.8.9
yarn_build = 458
loader_version = 0.14.19
yarn_build = 514
loader_version = 0.14.21

# Legacy Fabric API
# Also available for mc 1.7.10, 1.8, 1.9.4, 1.10.2, 1.11.2 and 1.12.2
Expand Down
8 changes: 2 additions & 6 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
name = "Fabric"
url = "https://maven.fabricmc.net/"
}
maven {
name = "legacy-fabric"
url = "https://repo.legacyfabric.net/repository/legacyfabric/"
}
gradlePluginPortal()
maven {
name = 'Jitpack'
url = 'https://jitpack.io'
}
}
}

0 comments on commit c44d4c2

Please sign in to comment.