diff --git a/.gitignore b/.gitignore index ea767709..6ee73b37 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ venv/ Thumbs.db /.recommenders/ /key.gpg + +# Project +bin/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 7913ef86..4c186c6b 100644 --- a/build.gradle +++ b/build.gradle @@ -243,33 +243,17 @@ task buildLibraries { finalizedBy(copyLibraries) } -task put_files_in_META_INF { - def resDir = new File(buildDir, 'generated/files_for_META_INF/') - def destDir = new File(resDir, 'META-INF/') - java { - sourceSets { - main.resources { - srcDir resDir - } - } +tasks.withType(Jar) { + from(project.projectDir) { + include("LICENSE") + into("META-INF/license") } - doLast { - destDir.mkdirs() - copy { - from 'licenses' - into destDir - } - copy { - from 'LICENSE' - into destDir - } + from("${project.projectDir}/licenses") { + include("*") + into("META-INF/license") } } -processResources { - dependsOn('put_files_in_META_INF') -} - shadowJar { exclude 'help/' exclude 'icons/' @@ -286,4 +270,4 @@ shadowJar { exclude 'com/sun/jna/sunos-sparcv9/' exclude 'com/sun/jna/sunos-x86/' exclude 'com/sun/jna/sunos-x86-64/' -} +} \ No newline at end of file diff --git a/build_x64.gradle b/build_x64.gradle index 4ee0a7b8..4b5fe6b2 100644 --- a/build_x64.gradle +++ b/build_x64.gradle @@ -237,33 +237,17 @@ task buildLibraries { finalizedBy(copyLibraries) } -task put_files_in_META_INF { - def resDir = new File(buildDir, 'generated/files_for_META_INF/') - def destDir = new File(resDir, 'META-INF/') - java { - sourceSets { - main.resources { - srcDir resDir - } - } +tasks.withType(Jar) { + from(project.projectDir) { + include("LICENSE") + into("META-INF/license") } - doLast { - destDir.mkdirs() - copy { - from 'licenses' - into destDir - } - copy { - from 'LICENSE' - into destDir - } + from("${project.projectDir}/licenses") { + include("*") + into("META-INF/license") } } -processResources { - dependsOn('put_files_in_META_INF') -} - shadowJar { exclude 'help/' exclude 'icons/' @@ -280,4 +264,4 @@ shadowJar { exclude 'com/sun/jna/sunos-sparcv9/' exclude 'com/sun/jna/sunos-x86/' exclude 'com/sun/jna/sunos-x86-64/' -} +} \ No newline at end of file diff --git a/build_x86.gradle b/build_x86.gradle index 2a02b939..3342df03 100644 --- a/build_x86.gradle +++ b/build_x86.gradle @@ -237,33 +237,17 @@ task buildLibraries { finalizedBy(copyLibraries) } -task put_files_in_META_INF { - def resDir = new File(buildDir, 'generated/files_for_META_INF/') - def destDir = new File(resDir, 'META-INF/') - java { - sourceSets { - main.resources { - srcDir resDir - } - } +tasks.withType(Jar) { + from(project.projectDir) { + include("LICENSE") + into("META-INF/license") } - doLast { - destDir.mkdirs() - copy { - from 'licenses' - into destDir - } - copy { - from 'LICENSE' - into destDir - } + from("${project.projectDir}/licenses") { + include("*") + into("META-INF/license") } } -processResources { - dependsOn('put_files_in_META_INF') -} - shadowJar { exclude 'help/' exclude 'icons/' @@ -280,4 +264,4 @@ shadowJar { exclude 'com/sun/jna/sunos-sparcv9/' exclude 'com/sun/jna/sunos-x86/' exclude 'com/sun/jna/sunos-x86-64/' -} +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index afa1bb6b..df431f84 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = 'darklaf' +rootProject.name = 'darklaf' \ No newline at end of file