Flywheel/common/build.gradle
Jozufozu 15184b8ccd Declaration of jar
- Expose desired behaviors from platform plugin via an extension
- Move PlatformPlugin to platform package
2024-05-17 08:43:56 -07:00

76 lines
2.0 KiB
Groovy

plugins {
id 'idea'
id 'java'
id 'maven-publish'
id 'dev.architectury.loom'
id 'flywheel.java'
id 'flywheel.package-infos'
id 'flywheel.subproject'
id 'flywheel.jar-sets'
id 'flywheel.transitive-source-sets'
}
transitiveSourceSets {
compileClasspath = sourceSets.main.compileClasspath
create('api') {
rootCompile()
}
create('lib') {
rootCompile()
compile sourceSets.api
}
create('backend') {
rootCompile()
compile sourceSets.api, sourceSets.lib
}
sourceSet(sourceSets.main) {
compile sourceSets.api, sourceSets.lib, sourceSets.backend
}
sourceSet(sourceSets.test) {
implementation sourceSets.api, sourceSets.lib, sourceSets.backend
}
}
defaultPackageInfos {
sources sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
}
// For sharing with other subprojects.
jarSets {
createJars('apiOnly', sourceSets.api).createOutgoingConfiguration('common')
createJars('lib').createOutgoingConfiguration('common')
createJars('backend').createOutgoingConfiguration('common')
createJars('impl', sourceSets.main).createOutgoingConfiguration('common')
}
// For publishing
def apiLibJar = jarSets.createJars('api', sourceSets.api, sourceSets.lib)
dependencies {
modCompileOnly "net.fabricmc:fabric-loader:${fabric_loader_version}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
}
test {
useJUnitPlatform()
}
publishing {
publications {
register('mavenIntermediary', MavenPublication) {
artifact apiLibJar.remapJar
artifact apiLibJar.remapSources
artifact apiLibJar.javadocJar
artifactId = "flywheel-common-intermediary-api-${artifact_minecraft_version}"
}
register('mavenMojmap', MavenPublication) {
artifact apiLibJar.jar
artifact apiLibJar.sources
artifact apiLibJar.javadocJar
artifactId = "flywheel-common-mojmap-api-${artifact_minecraft_version}"
}
}
}