mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-25 21:40:05 +00:00
[VERY VERY VERY BAD IDEA]
This commit is contained in:
1 parent
f0e7fea13b
commit
2fa0853e42
892 files changed
+13482
-53554
No files matched your search
@@ -0,0 +1,35 @@
|
||||
Configuration nativeMinecraftSources = configurations.create('nativeMinecraftSources') {
|
||||
canBeConsumed = false
|
||||
canBeResolved = true
|
||||
}
|
||||
|
||||
Properties nativeLibraryProperties = new Properties()
|
||||
file('../../gradle.properties').withInputStream { InputStream stream -> nativeLibraryProperties.load(stream) }
|
||||
String nativeLibraryCoordinate = providers.gradleProperty('volmLibCoordinate')
|
||||
.getOrElse(nativeLibraryProperties.getProperty('volmLibCoordinate'))
|
||||
String nativeSourceLoader = extensions.extraProperties.get('nativeSourceLoader')
|
||||
String nativeSourceImplementation = 'minecraft26_2'
|
||||
extensions.extraProperties.set('nativeSourceImplementation', nativeSourceImplementation)
|
||||
dependencies.add(nativeMinecraftSources.name,
|
||||
"com.github.VolmitSoftware.VolmLib:native-${nativeSourceImplementation}-sources:${nativeLibraryCoordinate.tokenize(':').last()}")
|
||||
|
||||
TaskProvider<Sync> unpackNativeMinecraftSources = tasks.register('unpackNativeMinecraftSources', Sync) {
|
||||
dependsOn(nativeMinecraftSources)
|
||||
from(provider { nativeMinecraftSources.collect { File artifact -> zipTree(artifact) } }) {
|
||||
include('art/**', 'modded/**', "${nativeSourceLoader}/**",
|
||||
'resources/modded/**', "resources/${nativeSourceLoader}/**")
|
||||
}
|
||||
into(layout.buildDirectory.dir('generated/sources/native-minecraft'))
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDir(unpackNativeMinecraftSources)
|
||||
|
||||
sourceSets.main.resources.srcDir(layout.buildDirectory.dir('generated/sources/native-minecraft/resources/modded'))
|
||||
sourceSets.main.resources.srcDir(layout.buildDirectory.dir("generated/sources/native-minecraft/resources/${nativeSourceLoader}"))
|
||||
tasks.named('processResources').configure {
|
||||
dependsOn(unpackNativeMinecraftSources)
|
||||
}
|
||||
|
||||
tasks.matching { Task task -> task.name == 'createMinecraftArtifacts' }.configureEach {
|
||||
dependsOn(unpackNativeMinecraftSources)
|
||||
}
|
||||
Reference in new issue
Block a user