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

Support kotlin multiplatform modules #13

Open
0xffrom opened this issue Dec 30, 2024 · 1 comment
Open

Support kotlin multiplatform modules #13

0xffrom opened this issue Dec 30, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@0xffrom
Copy link

0xffrom commented Dec 30, 2024

Hi!

App Sizer plugin doesn't work with Kotlin multiplatform modules.

I applied plugin "org.jetbrains.kotlin.multiplatform" for KMM modules, and I occurred a crash IllegalArgumentException("${project.name} is not supported") in defaultFindMatchVariant method.

    private fun defaultFindMatchVariant(project: Project): AppSizeVariant {
        return when {
            project.isAndroidApplication -> AndroidAppSizeVariant(
                project.extractVariant(project.the<AppExtension>().applicationVariants)
            )

            project.isAndroidLibrary -> AndroidAppSizeVariant(
                project.extractVariant(project.the<LibraryExtension>().libraryVariants)
            )

            project.isJava || project.isKotlinJvm -> JarAppSizeVariant(project)
            else -> {
                throw IllegalArgumentException("${project.name} is not supported")
            }
        }
    }
@vanminh-grabtaxi
Copy link
Collaborator

Hi @0xffrom, thank trying the tool and reporting the issue. Let me take an investigation and come back on this

@vanminh-grabtaxi vanminh-grabtaxi self-assigned this Jan 1, 2025
@vanminh-grabtaxi vanminh-grabtaxi added the enhancement New feature or request label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants