Reorganize jfmod.gradle
This commit is contained in:
parent
262ea78201
commit
6df15e7638
70
jfmod.gradle
70
jfmod.gradle
|
@ -312,7 +312,24 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
setupRepositories(repositories)
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
||||
if (project.hasProperty("maven")) {
|
||||
maven {
|
||||
url = project.getProperty("maven")
|
||||
name = "dynamic"
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Job-Token"
|
||||
value = System.getenv().CI_JOB_TOKEN
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loom.disableDeprecatedPomGeneration(publishing.publications.mavenJava)
|
||||
|
@ -324,15 +341,26 @@ allprojects {
|
|||
subprojects {
|
||||
javadoc.enabled = false
|
||||
|
||||
dependencies {
|
||||
testmodImplementation sourceSets.main.output
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
genClientOnlySources.enabled = false
|
||||
genCommonSources.enabled = false
|
||||
unpickClientOnlyJar.enabled = false
|
||||
unpickCommonJar.enabled = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testmodImplementation sourceSets.main.output
|
||||
rootProject.dependencies {
|
||||
api project(path: project.path, configuration: "shadow")
|
||||
clientImplementation project.sourceSets.client.output
|
||||
|
||||
if (!rootProject.hasProperty("dev_only_module") || !(project.name in rootProject.getProperty("dev_only_module").split(", "))) {
|
||||
include project
|
||||
}
|
||||
|
||||
testmodImplementation project.sourceSets.testmod.output
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,40 +368,6 @@ sourceSets {
|
|||
testmod
|
||||
}
|
||||
|
||||
void setupRepositories(RepositoryHandler repositories) {
|
||||
def ENV = System.getenv()
|
||||
if (project.hasProperty("maven")) {
|
||||
repositories.maven {
|
||||
url = project.getProperty("maven")
|
||||
name = "dynamic"
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Job-Token"
|
||||
value = ENV.CI_JOB_TOKEN
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories.mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
afterEvaluate {
|
||||
subprojects.each {
|
||||
api project(path: it.path, configuration: "shadow")
|
||||
clientImplementation it.sourceSets.client.output
|
||||
|
||||
if (!project.hasProperty("dev_only_module") || !(it.name in project.getProperty("dev_only_module").split(", "))) {
|
||||
include it
|
||||
}
|
||||
|
||||
testmodImplementation it.sourceSets.testmod.output
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def readmeFile = rootProject.file("README.md")
|
||||
|
||||
if (ext.modrinthAvailable) {
|
||||
|
|
Loading…
Reference in New Issue