mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Account for IntelliJ bug
This commit is contained in:
parent
ad5dcbea58
commit
5fa311be48
@ -1,5 +1,6 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import net.fabricmc.loom.task.RemapJarTask
|
import net.fabricmc.loom.task.RemapJarTask
|
||||||
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
@ -95,11 +96,16 @@ artifacts {
|
|||||||
add("archives", tasks.named("deobfJar"))
|
add("archives", tasks.named("deobfJar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<RemapJarTask>("remapShadowJar") {
|
// intellij has trouble detecting RemapJarTask as a subclass of Task
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
val remapJarIntellijHack = RemapJarTask::class as KClass<Task>
|
||||||
|
tasks.register("remapShadowJar", remapJarIntellijHack) {
|
||||||
|
(this as RemapJarTask).run {
|
||||||
val shadowJar = tasks.getByName<ShadowJar>("shadowJar")
|
val shadowJar = tasks.getByName<ShadowJar>("shadowJar")
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
setInput(shadowJar.archiveFile)
|
setInput(shadowJar.archiveFile)
|
||||||
setOutput(shadowJar.archiveFile.get().asFile.absolutePath.replace(Regex("-dev\\.jar$"), ".jar"))
|
setOutput(shadowJar.archiveFile.get().asFile.absolutePath.replace(Regex("-dev\\.jar$"), ".jar"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("assemble").configure {
|
tasks.named("assemble").configure {
|
||||||
|
Loading…
Reference in New Issue
Block a user