Remove usages of TaskCollection.metaClass in favor of a variable
This commit is contained in:
parent
829e2415e6
commit
1791ae3dc0
|
|
@ -43,15 +43,13 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NeoGradle compiles the game, but we don't want to add our common code to the game's code
|
// NeoGradle compiles the game, but we don't want to add our common code to the game's code
|
||||||
TaskCollection.metaClass.excludingNeoTasks = { ->
|
Spec<Task> notNeoTask = { Task it -> !it.name.startsWith("neo") } as Spec<Task>
|
||||||
delegate.matching { !it.name.startsWith("neo") }
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile).excludingNeoTasks().configureEach {
|
tasks.withType(JavaCompile).matching(notNeoTask).configureEach {
|
||||||
source(project(":common").sourceSets.main.allSource)
|
source(project(":common").sourceSets.main.allSource)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(Javadoc).excludingNeoTasks().configureEach {
|
tasks.withType(Javadoc).matching(notNeoTask).configureEach {
|
||||||
source(project(":common").sourceSets.main.allJava)
|
source(project(":common").sourceSets.main.allJava)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +57,7 @@ tasks.named("sourcesJar", Jar) {
|
||||||
from(project(":common").sourceSets.main.allSource)
|
from(project(":common").sourceSets.main.allSource)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(ProcessResources).excludingNeoTasks().configureEach {
|
tasks.withType(ProcessResources).matching(notNeoTask).configureEach {
|
||||||
from project(":common").sourceSets.main.resources
|
from project(":common").sourceSets.main.resources
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user