diff --git a/README.md b/README.md index 3e34fff52..4c5103d13 100644 --- a/README.md +++ b/README.md @@ -43,16 +43,16 @@ You can find all code reference in the docs of the icon packs bellow. | Icon pack | Icon Version | Dependency | All Icons Docs | | --- | --- | --- | --- | -| [Simple-Icons](https://simpleicons.org/) | 4.14.0 | `simple-icons` | [docs](simple-icons/DOCUMENTATION.md) | -| [Feather](https://feathericons.com/) | 4.28.0 | `feather` | [docs](feather/DOCUMENTATION.md) | -| [Tabler Icons](https://tabler-icons.io/) | 1.39.1 | `tabler-icons` | [docs](tabler-icons/DOCUMENTATION.md) | -| [Eva Icons](https://akveo.github.io/eva-icons/#/) | 1.1.3 | `eva-icons` | [docs](eva-icons/DOCUMENTATION.md) | -| [Font Awesome](https://fontawesome.com/) | 5.15.2 | `font-awesome` | [docs](font-awesome/DOCUMENTATION.md) | -| [Octicons](https://primer.style/octicons/) | 12.1.0 | `octicons` | [docs](octicons/DOCUMENTATION.md) | -| [Linea](http://www.linea.io/) | 1.0 | `linea` | [docs](linea/DOCUMENTATION.md) | -| [Line Awesome](https://icons8.com/line-awesome) | 1.3.0 (a60f113) | `line-awesome` | [docs](line-awesome/DOCUMENTATION.md) | -| [Weather Icons by Erik Flowers](https://github.com/erikflowers/weather-icons) | 2.0.12 | `erikflowers-weather-icons` | [docs](erikflowers-weather-icons/DOCUMENTATION.md) | -| [css.gg](https://css.gg/) | 2.0.0 | `css-gg` | [docs](css-gg/DOCUMENTATION.md) | +| [css.gg](https://css.gg) | 2.1.1 | `css-gg` | [docs](css-gg/DOCUMENTATION.md) | +| [Erik Flowers' Weather Icons](https://github.com/erikflowers/weather-icons) | 2.0.12 | `erikflowers-weather-icons` | [docs](erikflowers-weather-icons/DOCUMENTATION.md) | +| [Eva Icons](https://akveo.github.io/eva-icons) | 1.1.3 | `eva-icons` | [docs](eva-icons/DOCUMENTATION.md) | +| [Feather](https://feathericons.com) | 4.29.2 | `feather` | [docs](feather/DOCUMENTATION.md) | +| [Font Awesome](https://fontawesome.com) | 6.6.0 | `font-awesome` | [docs](font-awesome/DOCUMENTATION.md) | +| [Line Awesome](https://icons8.com/line-awesome) | 1.3.1 (78a1012) | `line-awesome` | [docs](line-awesome/DOCUMENTATION.md) | +| [Linea](https://github.com/linea-io/Linea-Iconset) | 1.0 | `linea` | [docs](linea/DOCUMENTATION.md) | +| [Octicons](https://primer.style/octicons) | 19.12.0 | `octicons` | [docs](octicons/DOCUMENTATION.md) | +| [Simple-Icons](https://simpleicons.org) | 13.16.0 | `simple-icons` | [docs](simple-icons/DOCUMENTATION.md) | +| [Tabler Icons](https://tabler-icons.io) | 3.22.0 | `tabler-icons` | [docs](tabler-icons/DOCUMENTATION.md) | ## Version Catalog diff --git a/css-gg/build.gradle.kts b/css-gg/build.gradle.kts index 148cf390f..6c6e50b31 100644 --- a/css-gg/build.gradle.kts +++ b/css-gg/build.gradle.kts @@ -18,7 +18,7 @@ android { registerGeneratorTask( githubId = "astrit/css.gg", - version = "2.0.0", + version = "2.1.1", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> val iconsDir = File(repoCloneDir, "icons/svg") @@ -45,6 +45,6 @@ registerGeneratorTask( accessorName = "CssGgIcons", ), licensePathAtRepo = { "LICENSE" }, - documentationHeader = "[css.gg](https://css.gg/)" + documentationHeader = "[css.gg](https://css.gg)" ) diff --git a/erikflowers-weather-icons/build.gradle.kts b/erikflowers-weather-icons/build.gradle.kts index 88510dca0..f62b78fe6 100644 --- a/erikflowers-weather-icons/build.gradle.kts +++ b/erikflowers-weather-icons/build.gradle.kts @@ -45,6 +45,6 @@ registerGeneratorTask( accessorName = "WeatherIcons", ), licensePathAtRepo = { null }, - documentationHeader = "[Weather Icons by Erik Flowers](https://github.com/erikflowers/weather-icons)", + documentationHeader = "[Erik Flowers' Weather Icons](https://github.com/erikflowers/weather-icons)", licenseUrl = { _, _ -> "http://scripts.sil.org/OFL" } ) \ No newline at end of file diff --git a/erikflowers-weather-icons/gradle.properties b/erikflowers-weather-icons/gradle.properties index 6738654e0..f81069c17 100644 --- a/erikflowers-weather-icons/gradle.properties +++ b/erikflowers-weather-icons/gradle.properties @@ -1,2 +1,2 @@ -POM_NAME=Compose Icons Weather Icons by Erik Flowers +POM_NAME=Compose Icons Erik Flowers' Weather Icons POM_ARTIFACT_ID=erikflowers-weather-icons \ No newline at end of file diff --git a/eva-icons/build.gradle.kts b/eva-icons/build.gradle.kts index 232f2661d..033587b87 100644 --- a/eva-icons/build.gradle.kts +++ b/eva-icons/build.gradle.kts @@ -71,5 +71,5 @@ registerGeneratorTask( } ), licensePathAtRepo = { "LICENSE.txt" }, - documentationHeader = "[Eva Icons](https://akveo.github.io/eva-icons/)", + documentationHeader = "[Eva Icons](https://akveo.github.io/eva-icons)", ) \ No newline at end of file diff --git a/feather/build.gradle.kts b/feather/build.gradle.kts index af5480b0b..a4b875557 100644 --- a/feather/build.gradle.kts +++ b/feather/build.gradle.kts @@ -18,7 +18,7 @@ android { registerGeneratorTask( githubId = "feathericons/feather", - version = "v4.28.0", + version = "v4.29.2", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> val iconsDir = File(repoCloneDir, "icons") @@ -46,5 +46,5 @@ registerGeneratorTask( accessorName = "FeatherIcons", ), licensePathAtRepo = { "LICENSE" }, - documentationHeader = "[Feather Icons](https://feathericons.com/)" + documentationHeader = "[Feather Icons](https://feathericons.com)" ) diff --git a/font-awesome/build.gradle.kts b/font-awesome/build.gradle.kts index 9ab09316f..841e431ea 100644 --- a/font-awesome/build.gradle.kts +++ b/font-awesome/build.gradle.kts @@ -18,7 +18,7 @@ android { registerGeneratorTask( githubId = "FortAwesome/Font-Awesome", - version = "5.15.2", + version = "6.6.0", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> val relocatedNames = mutableMapOf() diff --git a/line-awesome/build.gradle.kts b/line-awesome/build.gradle.kts index b68fea14a..cf71d9b48 100644 --- a/line-awesome/build.gradle.kts +++ b/line-awesome/build.gradle.kts @@ -18,8 +18,8 @@ android { registerGeneratorTask( githubId = "icons8/line-awesome", - version = "a60f11367584e7df157277b5ab9d1654ec91ae24", - gitCheckoutName = "a60f11367584e7df157277b5ab9d1654ec91ae24", + version = "78a101217707c9b1c4dcf2a821be75684e36307f", // 1.3.1 + gitCheckoutName = "78a101217707c9b1c4dcf2a821be75684e36307f", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> val relocatedNames = mutableMapOf() diff --git a/linea/build.gradle.kts b/linea/build.gradle.kts index d0d7233a5..cf6f9a96d 100644 --- a/linea/build.gradle.kts +++ b/linea/build.gradle.kts @@ -61,5 +61,5 @@ registerGeneratorTask( accessorName = "LineaIcons", ), licensePathAtRepo = { "LICENSE" }, - documentationHeader = "[Linea](http://www.linea.io/)" + documentationHeader = "[Linea](https://github.com/linea-io/Linea-Iconset)" ) diff --git a/octicons/build.gradle.kts b/octicons/build.gradle.kts index 23d53eaa8..12a45fa42 100644 --- a/octicons/build.gradle.kts +++ b/octicons/build.gradle.kts @@ -18,7 +18,7 @@ android { registerGeneratorTask( githubId = "primer/octicons", - version = "v12.1.0", + version = "v19.12.0", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> val relocatedNames = mutableMapOf() @@ -46,5 +46,5 @@ registerGeneratorTask( accessorName = "Octicons", ), licensePathAtRepo = { "LICENSE" }, - documentationHeader = "[Octicons](https://primer.style/octicons/)" + documentationHeader = "[Octicons](https://primer.style/octicons)" ) diff --git a/sample/src/commonMain/kotlin/compose/icons/sample/data/iconPacks.kt b/sample/src/commonMain/kotlin/compose/icons/sample/data/iconPacks.kt index 6782cffb9..a9b92cd54 100644 --- a/sample/src/commonMain/kotlin/compose/icons/sample/data/iconPacks.kt +++ b/sample/src/commonMain/kotlin/compose/icons/sample/data/iconPacks.kt @@ -1,6 +1,5 @@ package compose.icons.sample.data -import compose.icons.AllIcons import compose.icons.AllIconsNamed import compose.icons.CssGgIcons import compose.icons.EvaIcons @@ -21,7 +20,7 @@ val iconPacks = listOf( allIcons = CssGgIcons.AllIconsNamed, ), IconPackModel( - packName = "Weather Icons by Erik Flowers", + packName = "Erik Flowers' Weather Icons", allIcons = WeatherIcons.AllIconsNamed, ), IconPackModel( diff --git a/simple-icons/build.gradle.kts b/simple-icons/build.gradle.kts index b38850f3b..f93061033 100644 --- a/simple-icons/build.gradle.kts +++ b/simple-icons/build.gradle.kts @@ -5,6 +5,7 @@ import generator.putRelocatedRelativeTo import generator.registerGeneratorTask import org.jetbrains.kotlin.com.google.gson.Gson import java.text.Normalizer +import java.util.Locale plugins { kotlin("multiplatform") @@ -21,24 +22,20 @@ android { registerGeneratorTask( githubId = "simple-icons/simple-icons", - version = "4.14.0", + version = "13.17.0", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> val relocatedNames = mutableMapOf() - val ignoredIcons = listOf( - "Elsevier" - ) - val iconsJsonFile = File(repoCloneDir, "_data/simple-icons.json") - val icons = Gson().fromJson(iconsJsonFile.readText(), SimpleIcons::class.java).icons + val icons = Gson().fromJson(iconsJsonFile.readText(), SimpleIcons::class.java).icons fun String.normalize(form: Normalizer.Form): String { return Normalizer.normalize(this, form) } fun iconTitleToSlug(title: String): String { - return title.toLowerCase() + return title.lowercase(Locale.getDefault()) .replace("\\+".toRegex(), "plus") .replace("^\\.".toRegex(), "dot-") .replace("\\.$".toRegex(), "-dot") @@ -59,14 +56,16 @@ registerGeneratorTask( .replace("[^a-z0-9\\-]".toRegex(), "") } - val iconsNamesFixed = icons.map { if(it.slug != null) it.slug!! else iconTitleToSlug(it.title) } + val iconsNamesFixed = icons.map { if (it.slug != null) it.slug!! else iconTitleToSlug(it.title) } val iconsDir = File(repoCloneDir, "icons") + val ignoredIcons = listOf("Elsevier") + iconsNamesFixed .associate { val sourceName = it.replace(" ", "_").replace("-", "_") + ".svg" - val fileName = it.replace(" ", "") + ".svg" + val fileName = it.replace(" ", "").replace("-", "") + ".svg" val icon = File(iconsDir, fileName) val renamed = File(iconsDir, sourceName) @@ -76,12 +75,10 @@ registerGeneratorTask( sourceName to fileName } - .apply { - forEach { - if (ignoredIcons.any { ignored -> it.value.contains(ignored, ignoreCase = true) }) { - File(iconsDir, it.value).delete() - println("Removed ignored icon: ${it.key}") - } + .onEach { + if (ignoredIcons.any { ignored -> it.value.contains(ignored, ignoreCase = true) }) { + File(iconsDir, it.value).delete() + println("Removed ignored icon: ${it.key}") } } @@ -95,5 +92,5 @@ registerGeneratorTask( accessorName = "SimpleIcons", ), licensePathAtRepo = { "LICENSE.md" }, - documentationHeader = "[Simple Icons](https://simpleicons.org/)" + documentationHeader = "[Simple Icons](https://simpleicons.org)" ) \ No newline at end of file diff --git a/tabler-icons/build.gradle.kts b/tabler-icons/build.gradle.kts index 786dd6534..2195c2d7d 100644 --- a/tabler-icons/build.gradle.kts +++ b/tabler-icons/build.gradle.kts @@ -18,23 +18,24 @@ android { registerGeneratorTask( githubId = "tabler/tabler-icons", - version = "v1.39.1", + version = "v3.22.0", mapSourceCodeIconsToSvgComposeFolder = { repoCloneDir -> - val iconsDir = File(repoCloneDir, "icons") - val relocatedNames = mutableMapOf() - // renaming to match to svg-to-compose - iconsDir.listFiles().filter { it.extension == "svg" } - .forEach { - val newFile = File(it.parentFile, it.name.replace("-", "_")) - - // store the name change - relocatedNames.putRelocatedRelativeTo(repoCloneDir, newFile, it) - - // rename to conform with SVG to Compose - it.renameTo(newFile) - } + val iconsDir = File(repoCloneDir, "icons") + val iconFiles = iconsDir.listFiles() + ?.flatMap { it.listFiles().orEmpty().toList() } + ?.filter { it.extension == "svg" } + .orEmpty() + iconFiles.forEach { + val newFile = File(it.parentFile, it.name.replace("-", "_")) + + // store the name change + relocatedNames.putRelocatedRelativeTo(repoCloneDir, newFile, it) + + // rename to conform with SVG to Compose + it.renameTo(newFile) + } MapIconsToSvgComposeFolderResult( iconsFolder = iconsDir,