aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-03-02 00:11:08 +0100
committer zaaarf <zaaarf@proton.me>2023-03-02 00:11:08 +0100
commit5cb00414696184fb1ef4febbad7b255bb3174449 (patch)
treec45caae672f95d36c8fe4f92944fec2fb7a4d9c7 /build.gradle
parent9b92d8fb7ff17e9b5b68224494de049034406963 (diff)
chore: cleanup, created libs.version.toml
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle92
1 files changed, 23 insertions, 69 deletions
diff --git a/build.gradle b/build.gradle
index 4274a11..808fa66 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,35 +1,17 @@
-buildscript {
- repositories {
- maven { url = 'https://maven.minecraftforge.net' }
- mavenCentral()
- }
- dependencies {
- classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
- classpath "com.palantir.gradle.gitversion:gradle-git-version:0.13.0"
- }
-}
-
-repositories {
- maven { url = 'https://maven.fantabos.co' }
+plugins {
+ id 'java'
+ id 'eclipse'
+ alias libs.plugins.forgeGradle;
+ alias libs.plugins.gitVersion;
}
-apply plugin: 'net.minecraftforge.gradle'
-apply plugin: 'java'
-apply plugin: 'eclipse'
-apply plugin: 'maven-publish'
-apply plugin: "com.palantir.git-version"
-
version = gitVersion()
group = 'ftbsc'
archivesBaseName = 'bscv'
def shortVersion = version.split('-')[0]
-// Minecraft and Forge versions
-def minecraftVersion = '1.16.5'
-def forgeVersion = '36.2.34'
-
-project.ext { // external properties coming from gradle.properties
+project.ext {
deployJarDo = getProjectProperty("deployJar.do", "false")
deployJarTargetDir = getProjectProperty("deployJar.targetDir", ".")
}
@@ -38,65 +20,50 @@ def getProjectProperty(String property, String fallback) { //allows for custom g
return (project.hasProperty(property)) ? project.property(property) : fallback
}
-java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.
+java.toolchain.languageVersion = JavaLanguageVersion.of(8)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
- mappings channel: 'official', version: minecraftVersion
+ mappings channel: 'official', version: libs.versions.minecraft.get()
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
-
- // Recommended logging data for a userdev environment
- // The markers can be changed as needed.
- // "SCAN": For mods scan.
- // "REGISTRIES": For firing of registry events.
- // "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
-
mods {
- bscv {
- source sourceSets.main
- }
+ bscv.source sourceSets.main
}
}
-
data {
workingDirectory project.file('run')
-
- // "SCAN": For mods scan.
- // "REGISTRIES": For firing of registry events.
- // "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
-
- // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'bsvc', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
-
mods {
- bscv {
- source sourceSets.main
- }
+ bscv.source sourceSets.main
}
}
}
}
-// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
+repositories {
+ mavenCentral()
+ maven { url = 'https://maven.fantabos.co' }
+}
+
dependencies {
- minecraft "net.minecraftforge:forge:${minecraftVersion}-${forgeVersion}"
- implementation 'ftbsc:lll:0.2.2'
- implementation 'ftbsc.lll:processor:0.1.1'
- implementation 'com.google.auto.service:auto-service-annotations:1.0.1'
- annotationProcessor 'com.squareup:javapoet:1.13.0'
- annotationProcessor 'ftbsc:lll:0.2.2'
- annotationProcessor 'ftbsc.lll:processor:0.1.1'
- annotationProcessor 'com.google.auto.service:auto-service:1.0.1'
+ minecraft libs.minecraftForge
+ implementation libs.lillero
+ implementation libs.lilleroProcessor
+ implementation libs.autoServiceAnnotations
+ annotationProcessor libs.javaPoet
+ annotationProcessor libs.lillero
+ annotationProcessor libs.lilleroProcessor
+ annotationProcessor libs.autoService
}
jar {
@@ -123,19 +90,6 @@ tasks.register('deployJar', Copy) {
into project.ext.deployJarTargetDir
}
-publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact jar
- }
- }
- repositories {
- maven {
- url "file:///${project.projectDir}/mcmodsrepo"
- }
- }
-}
-
build {
//dependsOn shadowJar, reobfShadowJar
finalizedBy deployJar