diff --git a/.gitignore b/.gitignore
index 521e14b..d037336 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ build/
!**/src/test/**/build/
*/run
+*/logs
### IntelliJ IDEA ###
.idea
diff --git a/Database/build.gradle b/Database/build.gradle
index 27285c6..87ae4db 100644
--- a/Database/build.gradle
+++ b/Database/build.gradle
@@ -1,11 +1,4 @@
dependencies {
implementation 'org.postgresql:postgresql:42.5.0'
testImplementation 'com.google.code.gson:gson:2.10'
- testImplementation "org.junit.jupiter:junit-jupiter-api:${project.junit_version}"
- testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.junit_version}"
}
-
-test {
- useJUnitPlatform()
-}
-
diff --git a/Pagination/build.gradle b/Pagination/build.gradle
index 590944e..75f7707 100644
--- a/Pagination/build.gradle
+++ b/Pagination/build.gradle
@@ -1,6 +1,5 @@
plugins {
- id 'fabric-loom' version '1.1-SNAPSHOT'
-
+ id 'fabric-loom'
}
dependencies {
@@ -9,9 +8,6 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
-
- testImplementation "org.junit.jupiter:junit-jupiter-api:${project.junit_version}"
- testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.junit_version}"
}
processResources {
@@ -36,9 +32,4 @@ tasks.withType(JavaCompile).configureEach {
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion
}
-}
-
-
-test {
- useJUnitPlatform()
-}
+}
\ No newline at end of file
diff --git a/Pagination/src/main/java/fr/altarik/toolbox/pagination/api/PaginationApi.java b/Pagination/src/main/java/fr/altarik/toolbox/pagination/api/PaginationApi.java
index b6197e0..3adb373 100644
--- a/Pagination/src/main/java/fr/altarik/toolbox/pagination/api/PaginationApi.java
+++ b/Pagination/src/main/java/fr/altarik/toolbox/pagination/api/PaginationApi.java
@@ -14,7 +14,6 @@ public interface PaginationApi {
*
Special values are:
*
- null if you doesn't want to add a header
* - empty String if you want just the header to be filled only with "="
- *
* @throws IllegalArgumentException if one of its conditions is met:
* - header length is more than 50 characters
* - content is empty
diff --git a/Tasks/build.gradle b/Tasks/build.gradle
index 590944e..77c4a5a 100644
--- a/Tasks/build.gradle
+++ b/Tasks/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id 'fabric-loom' version '1.1-SNAPSHOT'
+ id 'fabric-loom'
}
@@ -9,9 +9,6 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
-
- testImplementation "org.junit.jupiter:junit-jupiter-api:${project.junit_version}"
- testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.junit_version}"
}
processResources {
@@ -37,8 +34,3 @@ tasks.withType(JavaCompile).configureEach {
it.options.release = targetVersion
}
}
-
-
-test {
- useJUnitPlatform()
-}
diff --git a/build.gradle b/build.gradle
index f860cd0..7ab39e6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,20 +1,40 @@
-allprojects {
- group = project.maven_group
- version = project.maven_version
+plugins {
+ id 'java'
+ id 'fabric-loom' version '1.1-SNAPSHOT' apply false
}
-subprojects {
+allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
+
+ group = project.maven_group
+ version = project.maven_version
+
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
+ repositories {
+ maven {
+ name 'altarik-snapshots'
+ url 'https://repo.altarik.fr/snapshots/'
+ }
+ maven {
+ name 'altarik-releases'
+ url 'https://repo.altarik.fr/releases/'
+ }
+ maven {
+ name = 'Fabric'
+ url = 'https://maven.fabricmc.net/'
+ }
+ mavenCentral()
+ }
+
publishing {
publications {
mavenJava(MavenPublication) {
- from components.java
+ from components.java
}
- }
+ }
repositories {
maven {
name 'altarik'
@@ -26,24 +46,31 @@ subprojects {
}
}
}
+}
+subprojects {
+
+ dependencies {
+ testImplementation "org.junit.jupiter:junit-jupiter-api:${project.junit_version}"
+ testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.junit_version}"
+ }
java {
withSourcesJar()
withJavadocJar()
}
+ test {
+ useJUnitPlatform()
+ }
- repositories {
- maven {
- name 'altarik-snapshots'
- url 'https://repo.altarik.fr/snapshots/'
- }
- maven {
- name 'altarik-releases'
- url 'https://repo.altarik.fr/releases/'
- }
+}
- mavenCentral()
+jar {
+ dependsOn subprojects.jar
+ subprojects.each { project ->
+ from(project.jar) {
+ into("META-INF/jars/")
+ }
}
}
diff --git a/gradle.properties b/gradle.properties
index 706b1f7..f76810d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-org.gradle.jvmargs=-Xmx5G
+org.gradle.jvmargs=-Xmx4G
junit_version=5.9.0
@@ -10,4 +10,4 @@ fabric_version=0.75.1+1.19.3
maven_group=fr.altarik.toolbox
maven_version=4.0.0-SNAPSHOT
repo_username=Altarik
-repo_password=password
\ No newline at end of file
+repo_password=password
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
new file mode 100644
index 0000000..64fd303
--- /dev/null
+++ b/src/main/resources/fabric.mod.json
@@ -0,0 +1,29 @@
+{
+ "schemaVersion": 1,
+ "id": "toolbox",
+ "version": "${version}",
+ "name": "Altarik Toolbox",
+ "description": "Altarik Toolbox, for developers",
+ "authors": [
+ "Altarik"
+ ],
+ "contributors": [
+ "Legot Quentin"
+ ],
+ "contact": {
+ "homepage": "https://altarik.fr"
+ },
+ "license": "Altarik @ All-Rights-Reserved ",
+ "icon": "assets/quests/icon.png",
+ "environment": "*",
+ "mixins": [
+ "toolbox.mixins.json"
+ ],
+ "depends": {
+ "fabricloader": "^0.14.12",
+ "fabric-api": "*",
+ "minecraft": "1.19.3",
+ "java": ">=17"
+ }
+ }
+