Skip to content

Commit b712390

Browse files
committed
Fixed rename Windres task
1 parent a36c8a3 commit b712390

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

java/build.gradle.kts

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5252
tasks.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-
8680
val libraries = arrayOf("dxf","io","net","pdf","serial","svg")
8781
libraries.forEach { library ->
8882
tasks.register<Copy>("library-$library-extraResources"){

java/gradle/src/test/kotlin/ProcessingPluginTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class ProcessingPluginTest{
177177

178178
@Test
179179
fun testImportingLibrary(){
180-
180+
// TODO: Implement a test that imports a Processing library and uses it in the sketch
181181
}
182182

183183
fun isDebuggerAttached(): Boolean {

0 commit comments

Comments
 (0)