Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use android tools for SVG to Vector Drawable conversion #47

Merged
merged 22 commits into from
Jul 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bump the library
jzbrooks committed Jul 27, 2024
commit ca9b4c56ef4657574ece06d025bcef0a89199715
4 changes: 3 additions & 1 deletion vgo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ val r8: Configuration by configurations.creating

dependencies {
implementation(project(":vgo-core"))
implementation("com.android.tools:sdk-common:30.2.2")
implementation("com.android.tools:sdk-common:31.5.1")

testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.28.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.3")
@@ -57,7 +57,9 @@ tasks {
"META-INF/DEPENDENCIES",
"META-INF/AL2.0",
"META-INF/BCKEY.DSA",
"META-INF/BC2048KE.DSA",
"META-INF/BCKEY.SF",
"META-INF/BC2048KE.SF",
"**/NOTICE*",
"javax/activation/**",
"xsd/catalog.xml",
6 changes: 3 additions & 3 deletions vgo/src/main/kotlin/com/jzbrooks/vgo/Application.kt
Original file line number Diff line number Diff line change
@@ -65,11 +65,11 @@ class Application {
if (inputs.isEmpty()) {
require(outputs.isEmpty())

var path = readLine()
var path = readlnOrNull()
val standardInPaths = mutableListOf<String>()
while (path != null) {
standardInPaths.add(path)
path = readLine()
path = readlnOrNull()
}

inputs = standardInPaths
@@ -150,7 +150,7 @@ class Application {
rootNodes.any { it.nodeName == "svg" || input.extension == "svg" } -> {
if (outputFormat == "vd") {
ByteArrayOutputStream().use { pipeOrigin ->
val errors = Svg2Vector.parseSvgToXml(input, pipeOrigin)
val errors = Svg2Vector.parseSvgToXml(input.toPath(), pipeOrigin)
if (errors != "") {
System.err.println(errors)
// return