/
processMods.gradle
70 lines (56 loc) · 2.27 KB
/
processMods.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/// Copyright (c) 2021 anatawa12 and other contributors
/// This file is part of fixRTM, released under GNU LGPL v3 with few exceptions
/// See LICENSE at https://github.com/fixrtm/fixRTM for more details
final importantStructureDir = new File(projectDir, "important-structure")
task addImportantStructureDir(type: Exec) {
commandLine 'git', 'add', importantStructureDir
}
task printResourceConfigFieldStructure(type: PrintFieldStructure) {
dependsOn downloadModRtm
finalizedBy addImportantStructureDir
files = zipTree(downloadModRtm.destniation).matching {
include "**/*.class"
}
outTo = new File(importantStructureDir, "fields-ResourceConfig")
superClass = "jp.ngt.rtm.modelpack.cfg.ResourceConfig"
}
task printResourceSetFieldStructure(type: PrintFieldStructure) {
dependsOn downloadModRtm
finalizedBy addImportantStructureDir
files = zipTree(downloadModRtm.destniation).matching {
include "**/*.class"
}
outTo = new File(importantStructureDir, "fields-ResourceSet")
superClass = "jp.ngt.rtm.modelpack.modelset.ResourceSet"
condition = { String internalName ->
internalName.startsWith("jp/ngt/rtm/modelpack/modelset/")
}
exclude "jp.ngt.rtm.modelpack.cfg.ResourceConfig"
}
task printRTMResourceStaticFields(type: PrintStaticFields) {
dependsOn downloadModRtm
finalizedBy addImportantStructureDir
files = zipTree(downloadModRtm.destniation).matching {
include "**/*.class"
}
outTo = new File(importantStructureDir, "fields-RTMResource.txt")
ofClass = "jp.ngt.rtm.RTMResource"
}
task printModelPackLoadMethodCode(type: PrintMethodCode) {
dependsOn downloadModRtm
finalizedBy addImportantStructureDir
files = zipTree(downloadModRtm.destniation).matching {
include "**/*.class"
}
outTo = new File(importantStructureDir, "fields-ModelPackLoadMethodCode.txt")
ofClass = "jp.ngt.rtm.modelpack.ModelPackManager"
methodName = "load"
methodDesc = "(Ljp/ngt/rtm/modelpack/init/ModelPackLoadThread;)V"
}
task printImportantStructure {
dependsOn printResourceConfigFieldStructure
dependsOn printResourceSetFieldStructure
dependsOn printRTMResourceStaticFields
dependsOn printModelPackLoadMethodCode
}
build.dependsOn printImportantStructure