i did the same.. replcing it with -embedable.. sav...
# scripting
n
i did the same.. replcing it with -embedable.. saves me a gradn total of 2 MB on the jar it seems
i
It is rather surprising. The embeddable version should not be that different in size, it differs only by package names.
n
this is how i measured it:
Copy code
kotlin
tasks.create("depsize") {
        group = "help"
        doLast {
            val formatStr = "%,10.2f"
            val conf = configurations.default.orNull!!
            val size = conf.resolve().map { it.length() / (1024.0 * 1024.0) }.sum()

            val out = buildString {
                append("Total dependencies size:".padEnd(45))
                append("${String.format(formatStr, size)} Mb\n\n")
                conf.sortedWith (compareBy { -it.length() } ).forEach {
                        append(it.name.padEnd(45))
                        append("${String.format(formatStr, (it.length() / 1024.0))} kb\n")
                    }
            }
            logger.lifecycle(out)
        }
    }