Gradle only adds classes jar, not adding sources jar to dependencies.
There is ServerCore-sources.jar in the maven local folder of ServerCore, that I’m gonna add to dependency.
And I used compileOnly(“kr.sul:ServerCore:1.0-SNAPSHOT”) for this work, in build.gradle.kts.
publishing {
java {
withSourcesJar()
withJavadocJar()
}
publications {
create<MavenPublication>("maven") {
groupId = rootProject.group as String
version = rootProject.version as String
from(components["java"])
}
}
}