add common code to sources and javadoc jars

This commit is contained in:
Jared 2023-06-11 04:08:28 +02:00
parent 2406e0394f
commit 5295b1ed68
2 changed files with 17 additions and 5 deletions

View File

@ -17,7 +17,7 @@ dependencies {
}
loom {
if(project(":common").file("src/main/resources/${mod_id}.accesswidener").exists()){
if (project(":common").file("src/main/resources/${mod_id}.accesswidener").exists()) {
accessWidenerPath.set(project(":common").file("src/main/resources/${mod_id}.accesswidener"))
}
mixin {
@ -39,13 +39,19 @@ loom {
}
}
processResources {
from project(":common").sourceSets.main.resources
}
tasks.withType(JavaCompile).configureEach {
source(project(":common").sourceSets.main.allSource)
}
tasks.withType(Javadoc).configureEach {
source(project(":common").sourceSets.main.allJava)
}
tasks.named("sourcesJar", Jar) {
from(project(":common").sourceSets.main.allSource)
}
processResources {
from project(":common").sourceSets.main.resources
}
publishing {
publications {

View File

@ -81,6 +81,12 @@ dependencies {
tasks.withType(JavaCompile).configureEach {
source(project(":common").sourceSets.main.allSource)
}
tasks.withType(Javadoc).configureEach {
source(project(":common").sourceSets.main.allJava)
}
tasks.named("sourcesJar", Jar) {
from(project(":common").sourceSets.main.allSource)
}
processResources {
from project(":common").sourceSets.main.resources