Integrate AP
This commit is contained in:
parent
64348c0bf6
commit
08078c8a95
|
|
@ -16,37 +16,21 @@ dependencies {
|
|||
parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
|
||||
}
|
||||
}
|
||||
annotationProcessor project(":annotation-processor")
|
||||
}
|
||||
|
||||
project.sourceSets {
|
||||
main.resources.srcDirs += [layout.buildDirectory.dir("generated/sources/annotationProcessor/java/main/resources")]
|
||||
}
|
||||
// hack to shut up gradle about the hack to include generated resources
|
||||
tasks {
|
||||
processResources {
|
||||
def mixinFileList = []
|
||||
def mixinDirectory = file("src/main/java/org/embeddedt/modernfix/" + project.name + "/mixin")
|
||||
fileTree(mixinDirectory).visit { FileVisitDetails details ->
|
||||
if(details.file.isFile()) {
|
||||
def fileName = mixinDirectory.relativePath(details.file).toString().replaceFirst(/\.java$/, "").replace('/', '.')
|
||||
mixinFileList << fileName
|
||||
}
|
||||
}
|
||||
dependsOn compileJava
|
||||
}
|
||||
}
|
||||
|
||||
def mixinClassesStringB = new StringBuilder()
|
||||
for(int i = 0; i < mixinFileList.size(); i++) {
|
||||
mixinClassesStringB.append(" \"")
|
||||
mixinClassesStringB.append(mixinFileList.get(i))
|
||||
mixinClassesStringB.append('"')
|
||||
if(i < (mixinFileList.size() - 1))
|
||||
mixinClassesStringB.append(',')
|
||||
mixinClassesStringB.append('\n')
|
||||
}
|
||||
|
||||
def replacements = [
|
||||
mixin_classes: mixinClassesStringB.toString()
|
||||
]
|
||||
|
||||
inputs.properties replacements
|
||||
def filePattern = "modernfix-" + project.name + ".mixins.json"
|
||||
filesMatching(filePattern) {
|
||||
expand replacements
|
||||
}
|
||||
tasks.withType(JavaCompile) {
|
||||
configure(options) {
|
||||
options.compilerArgs << "-ArootProject.name=${rootProject.name}" << "-Aproject.name=${project.name}"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "org.embeddedt.modernfix.common.mixin",
|
||||
"plugin": "org.embeddedt.modernfix.core.ModernFixMixinPlugin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
${mixin_classes}
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"overwrites": {
|
||||
"conformVisibility": true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"required": true,
|
||||
"package": "org.embeddedt.modernfix.fabric.mixin",
|
||||
"plugin": "org.embeddedt.modernfix.core.ModernFixMixinPlugin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"minVersion": "0.8",
|
||||
"mixins": [
|
||||
${mixin_classes}
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"overwrites": {
|
||||
"conformVisibility": true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"required": true,
|
||||
"package": "org.embeddedt.modernfix.forge.mixin",
|
||||
"plugin": "org.embeddedt.modernfix.core.ModernFixMixinPlugin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"minVersion": "0.8",
|
||||
"mixins": [
|
||||
${mixin_classes}
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"overwrites": {
|
||||
"conformVisibility": true
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user