diff --git a/build.gradle.kts b/build.gradle.kts index 548b4f6a..39927c04 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.5.21" + kotlin("jvm") version "1.9.20" id("maven-publish") } group = "br.com.devsrsouza" -version = "0.7.0" +version = "0.10.0" repositories { mavenCentral() @@ -16,8 +16,8 @@ repositories { dependencies { implementation("com.google.guava:guava:23.0") - implementation("com.android.tools:sdk-common:27.2.0-alpha16") - implementation("com.android.tools:common:27.2.0-alpha16") + implementation("com.android.tools:sdk-common:31.6.0") + implementation("com.android.tools:common:31.6.0") implementation("com.squareup:kotlinpoet:1.9.0") implementation("org.ogce:xpp3:1.1.6") @@ -29,7 +29,13 @@ tasks.test { } tasks.withType() { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "11" +} + +kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("11")) + } } publishing { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 12d38de6..48c0a02c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/kotlin/br/com/devsrsouza/svg2compose/Svg2Compose.kt b/src/main/kotlin/br/com/devsrsouza/svg2compose/Svg2Compose.kt index b489c094..f3a828fd 100644 --- a/src/main/kotlin/br/com/devsrsouza/svg2compose/Svg2Compose.kt +++ b/src/main/kotlin/br/com/devsrsouza/svg2compose/Svg2Compose.kt @@ -66,7 +66,7 @@ object Svg2Compose { val parsedFile = File(drawableDir, "${iconName}.xml") parsedFile.parentFile.mkdirs() - Svg2Vector.parseSvgToXml(it, parsedFile.outputStream()) + Svg2Vector.parseSvgToXml(it.toPath(), parsedFile.outputStream()) it to parsedFile }.toList() @@ -88,6 +88,7 @@ object Svg2Compose { icons.values, groupClassName, iconsPackage, + generatePreview ) val memberNames = writer.generateTo(outputSourceDirectory) { true }