plugins { id 'java' id 'fabric-loom' version '1.1-SNAPSHOT' apply false } 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 } } repositories { maven { name 'altarik' url 'https://repo.altarik.fr/'.concat(project.version.endsWith('SNAPSHOT') ? 'snapshots/' : 'releases/') credentials { username = project.repo_username password = project.repo_password } } } } } 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() } } jar { dependsOn subprojects.jar subprojects.each { project -> from(project.jar) { into("META-INF/jars/") } } }