This message was deleted.
# community-support
s
This message was deleted.
j
main --- java --- me.jackie --- Main --- resources --- saveFile This is my file setup and I want to export the saveFile into the jar as well.
v
Is it
src/main/java
and
src/main/resources
?
Then you should not need to do anything more and it should already work unless you changed default settings.
If it is
main/java
and
main/resources
, you probably configured the
srcDir
for
java
source directory set of the
main
source set and the same you sould set the
srcDir
for the
resources
source directory set of the
main
source set.
j
Yeah it's
src/main/java
and
src/main/resources
but it doesn't seem to be exporting the save file.
Copy code
plugins {
    id 'application'
    id "com.github.johnrengelman.shadow" version "6.1.0"
}

application.mainClassName = 'me.jackie.Main'

sourceCompatibility = 1.8
group 'org.example'
version '1.0'

repositories {
    mavenCentral()
}


dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
    implementation "net.dv8tion:JDA:5.0.0-beta.2"
    implementation 'org.json:json:20230227'
    implementation 'com.google.code.gson:gson:2.10.1'
}

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
    sourceCompatibility = "1.8"
}
this is my
build.gradle
v
Then the file must be part of the jar
j
Fixed!