@@ -50,39 +50,33 @@ tasks.compileJava{
5050// Most of these are shims to be compatible with the old build system
5151// They should be removed in the future, as we work towards making things more Gradle-native
5252tasks.register<Copy >(" extraResources" ){
53- dependsOn(" :java:copyCore" )
54- from(" ." )
55- include(" keywords.txt" )
56- include(" theme/**/*" )
57- include(" application/**/*" )
58- into(layout.buildDirectory.dir(" resources-bundled/common/modes/java" ))
59- }
60- tasks.register<Copy >(" copyCore" ){
61- val coreProject = project(" :core" )
62- dependsOn(coreProject.tasks.jar)
63- from(coreProject.tasks.jar) {
64- include(" core*.jar" )
65- }
66- rename(" core.+\\ .jar" , " core.jar" )
67- into(coreProject.layout.projectDirectory.dir(" library" ))
68- }
69- tasks.register<Copy >(" renameWindres" ) {
70- val dir = layout.buildDirectory.dir(" resources-bundled/common/modes/java" )
53+ dependsOn(" copyCore" )
7154 val os = DefaultNativePlatform .getCurrentOperatingSystem()
7255 val platform = when {
7356 os.isWindows -> " windows"
7457 os.isMacOsX -> " macos"
7558 else -> " linux"
7659 }
77- from(dir) {
78- include(" *-$platform *" )
60+ from(layout.projectDirectory){
61+ include(" keywords.txt" )
62+ include(" theme/**/*" )
63+ include(" application/**/*" )
64+ exclude(" application/launch4j/bin/*" )
65+ }
66+ from(layout.projectDirectory){
67+ include (" application/launch4j/bin/*$platform " )
7968 rename(" (.*)-$platform (.*)" , " $1$2" )
8069 }
81- duplicatesStrategy = DuplicatesStrategy .INCLUDE
82- into(dir)
83- tasks.named(" extraResources" ){ dependsOn(this ) }
70+ into(layout.buildDirectory.dir(" resources-bundled/common/modes/java" ))
71+ }
72+ tasks.register<Copy >(" copyCore" ){
73+ val coreProject = project(" :core" )
74+ dependsOn(coreProject.tasks.jar)
75+ from(coreProject.tasks.jar)
76+ include(" core*.jar" )
77+ rename(" core.+\\ .jar" , " core.jar" )
78+ into(coreProject.layout.projectDirectory.dir(" library" ))
8479}
85-
8680val libraries = arrayOf(" dxf" ," io" ," net" ," pdf" ," serial" ," svg" )
8781libraries.forEach { library ->
8882 tasks.register<Copy >(" library-$library -extraResources" ){
0 commit comments