Zakaria El Orche
07/21/2024, 2:56 PMplugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'maven-publish'
id 'org.ajoberstar.grgit' version '5.2.2'
id 'fabric-loom' version "$fabric_loom_version" apply false
id "com.github.node-gradle.node" version "7.0.2"
}
group = 'net.vitacraft'
archivesBaseName = 'DiscordBotManager'
version = "1.0"
description = "$ext.plugin_description"
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
repositories {
mavenCentral()
maven { url '<https://maven.fabricmc.net/>' }
maven { url '<https://libraries.minecraft.net/>' }
maven { url '<https://api.modrinth.com/maven>' }
maven { url '<https://repo.papermc.io/repository/maven-public/>' }
maven { url '<https://hub.spigotmc.org/nexus/content/repositories/snapshots/>' }
maven { url '<https://repo.spongepowered.org/repository/maven-public/>' }
maven { url '<https://jitpack.io>' }
}
dependencies {
implementation project(':common')
implementation project(':bukkit')
implementation project(':fabric')
implementation project(':velocity')
implementation project(':waterfall')
implementation project(':paper')
implementation project(':webui')
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
compileOnly 'com.mojang:brigadier:1.0.18'
compileOnly "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT"
implementation("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4")
shadow 'com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4'
implementation("net.dv8tion:JDA:5.0.1")
implementation files("${project.projectDir}/libs/JDA-5.0.1-withDependencies-min.jar")
implementation files("${project.projectDir}/libs/jmjda-1.2.1.jar")
}
processResources {
filesMatching(['fabric.mod.json', 'plugin.yml', '<http://mcmod.info|mcmod.info>', 'META-INF/mods.toml', 'pack.mcmeta']) {
expand project.properties
}
}
shadowJar {
archiveClassifier.set('')
dependencies {
exclude("META-INF/versions/**")
include(dependency('com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4'))
include(dependency("${project.group}:common"))
include(project(':common'))
include(project(':bukkit'))
include(project(':fabric'))
include(project(':velocity'))
include(project(':waterfall'))
include(project(':paper'))
include(':webui')
}
}
jar {
finalizedBy shadowJar
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
repositories {
mavenCentral()
maven { url "<https://libraries.minecraft.net>" }
maven { url '<https://jitpack.io>' }
}
dependencies {
if (project.name != 'common') {
implementation project(':common')
}
compileOnly 'org.jetbrains:annotations:24.1.0'
compileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
compileOnly 'com.mojang:brigadier:1.0.18'
shadow implementation("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4")
implementation("net.dv8tion:JDA:5.0.1")
implementation files("${project.projectDir}/libs/JDA-5.0.1-withDependencies-min.jar")
implementation files("${project.projectDir}/libs/jmjda-1.2.1.jar")
}
processResources {
filesMatching(['fabric.mod.json', 'plugin.yml', '<http://mcmod.info|mcmod.info>', 'META-INF/mods.toml', 'pack.mcmeta']) {
expand project.properties
}
}
shadowJar {
archiveClassifier.set('')
}
}
logger.lifecycle("Building ${project.name} ${version} by VitacraftOrg")
and my webui is built with this webui/build.gradle file
plugins {
id 'com.github.node-gradle.node' version '7.0.2'
}
node {
version = '14.17.0'
npmVersion = '6.14.13'
download = true
}
task npmBuild(type: NpmTask) {
dependsOn npmInstall
mustRunAfter jar
args = ['run', 'build']
inputs.files fileTree('src')
inputs.files fileTree('public')
inputs.file 'package.json'
inputs.file 'package-lock.json'
outputs.dir 'build'
}
clean {
delete 'build'
}
assemble.dependsOn npmBuild
issue is, after running ./gradlew clean build everything is built correctly but inspecting the output jar i cannot seem to find the "build" folder with the react assets, what am i doing wrong ?