Skip to content

Commit

Permalink
refactor build.gradle & increase lilylib version
Browse files Browse the repository at this point in the history
  • Loading branch information
jadelily18 committed Jun 18, 2023
1 parent 288c4a2 commit 7a7eb76
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REPO_USER=
REPO_TOKEN=
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ bin/
# fabric

run/

.env
41 changes: 31 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id "io.github.juuxel.loom-quiltflower" version "1.10.0"
id 'co.uzzu.dotenv.gradle' version '2.0.0'
id 'maven-publish'
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
}
Expand All @@ -20,7 +22,7 @@ repositories {

// For LilyLib
maven {
name = "Lilydev"
name "Lilydev"
url "https://maven.lilydev.com/snapshots"
}

Expand All @@ -30,7 +32,7 @@ repositories {
url "https://maven.nucleoid.xyz/"
}

// Fabric Permissions API
// For Fabric Permissions API
maven {
name "Sonatype"
url "https://oss.sonatype.org/content/repositories/snapshots"
Expand All @@ -40,23 +42,23 @@ repositories {

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
minecraft("com.mojang:minecraft:${project.minecraft_version}")
mappings("net.fabricmc:yarn:${project.yarn_mappings}:v2")
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}")

// 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}")

modImplementation "net.fabricmc:fabric-language-kotlin:${project.flk_version}"
modImplementation("net.fabricmc:fabric-language-kotlin:${project.flk_version}")

// LilyLib
modImplementation "com.lilydev:LilyLib:${project.lilylib_version}"
modApi("com.lilydev:LilyLib:${project.lilylib_version}")

// Placeholder API
modImplementation include("eu.pb4:placeholder-api:${project.placeholder_api_version}")
include(modImplementation("eu.pb4:placeholder-api:${project.placeholder_api_version}"))

// Fabric Permissions API
modImplementation include("me.lucko:fabric-permissions-api:${project.fabric_permissions_api_version}")
include(modImplementation("me.lucko:fabric-permissions-api:${project.fabric_permissions_api_version}"))
}

processResources {
Expand Down Expand Up @@ -99,5 +101,24 @@ publishing {
// 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
// retrieving dependencies.

maven {
name "lilydevMaven"

if (
project.mod_version.contains("beta") ||
project.mod_version.contains("alpha") ||
project.mod_version.contains("snapshot")
) {
url "https://maven.lilydev.com/snapshots"
} else {
url "https://maven.lilydev.com/releases"
}

credentials {
username env.REPO_USER.value
password env.REPO_TOKEN.value
}
}
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20
yarn_mappings=1.20+build.1
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.2
loader_version=0.14.21

# Mod Properties
Expand All @@ -13,8 +13,8 @@ org.gradle.jvmargs=-Xmx1G
archives_base_name = rules

# Dependencies
fabric_version=0.83.0+1.20
fabric_version=0.83.1+1.20.1
flk_version=1.9.5+kotlin.1.8.22
lilylib_version=0.1.0-beta.1
lilylib_version=0.1.0-beta.2
placeholder_api_version=2.1.1+1.20
fabric_permissions_api_version=0.2-SNAPSHOT
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"minecraft": "~1.20",
"java": ">=17",
"fabric-language-kotlin": "*",
"lilylib": ">=0.1.0-beta.1"
"lilylib": ">=0.1.0-beta.2"
}
}

0 comments on commit 7a7eb76

Please sign in to comment.