Skip to content

Commit 621d990

Browse files
authored
Migration of the svg library to Gradle (#1289)
* Update svg build.gradle.kts * update variable legacyLibraries and libraries
1 parent 76b9bae commit 621d990

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

java/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ tasks.register<Copy>("copyCore"){
6868
into(coreProject.layout.projectDirectory.dir("library"))
6969
}
7070

71-
val legacyLibraries = arrayOf("io","net","svg")
71+
val legacyLibraries = arrayOf("io","net")
7272
legacyLibraries.forEach { library ->
7373
tasks.register<Copy>("library-$library-extraResources"){
7474
val build = project(":java:libraries:$library").tasks.named("build")
@@ -87,7 +87,7 @@ legacyLibraries.forEach { library ->
8787
}
8888
}
8989

90-
val libraries = arrayOf("dxf", "pdf", "serial")
90+
val libraries = arrayOf("dxf", "pdf", "serial", "svg")
9191

9292
libraries.forEach { library ->
9393
val name = "create-$library-library"
Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,40 @@
1-
ant.importBuild("build.xml")
1+
plugins {
2+
java
3+
}
4+
5+
sourceSets {
6+
main {
7+
java {
8+
srcDirs("src")
9+
}
10+
}
11+
}
12+
repositories {
13+
mavenCentral()
14+
}
15+
16+
dependencies {
17+
compileOnly(project(":core"))
18+
19+
implementation("org.apache.xmlgraphics:batik-all:1.19")
20+
}
21+
22+
tasks.register<Copy>("createLibrary") {
23+
dependsOn("jar")
24+
into(layout.buildDirectory.dir("library"))
25+
26+
from(layout.projectDirectory) {
27+
include("library.properties")
28+
include("examples/**")
29+
}
30+
31+
from(configurations.runtimeClasspath) {
32+
into("library")
33+
}
34+
35+
from(tasks.jar) {
36+
into("library")
37+
rename { "svg.jar" }
38+
}
39+
}
40+

0 commit comments

Comments
 (0)