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

Task with name 'compileKotlin' not found in project ':app'. #2

Closed
droidxrx opened this issue Feb 21, 2023 · 4 comments
Closed

Task with name 'compileKotlin' not found in project ':app'. #2

droidxrx opened this issue Feb 21, 2023 · 4 comments

Comments

@droidxrx
Copy link

An exception occurred applying plugin request [id: 'io.github.izhangzhihao.unmeta', version: '1.0.0']

Failed to apply plugin 'io.github.izhangzhihao.unmeta'.
Task with name 'compileKotlin' not found in project ':app'.

@izhangzhihao
Copy link
Owner

make sure you have the gradle kotlin plugin applied.
https://github.com/izhangzhihao/unmeta#by-using-the-kotlin-dsl-in-buildgradlekt

@izhangzhihao izhangzhihao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2023
@rushiiMachine
Copy link

rushiiMachine commented Apr 11, 2023

make sure you have the gradle kotlin plugin applied. izhangzhihao/unmeta#by-using-the-kotlin-dsl-in-buildgradlekt

AGP replaces compileKotlin with compileReleaseKotlin and compileDebugKotlin, I already have KGP applied

Edit: found a temporary workaround:

plugins {
	id("io.github.izhangzhihao.unmeta") version "1.0.0" apply false
}

afterEvaluate {
    task<UnmetaTask>("releaseUnmeta")
        .apply { enable.set(true) }
        .also { tasks["compileReleaseKotlin"].finalizedBy(it) }
}

@izhangzhihao
Copy link
Owner

AGP is not supported yet, you can submit a pr to support AGP.

@izhangzhihao izhangzhihao pinned this issue Apr 12, 2023
@axzae
Copy link

axzae commented Apr 30, 2023

I have created a AGP plugin at https://github.com/axzae/unmeta-gradle-plugin

The plugin will only remove @DebugMetadata on release build.
Removing @Metadata is causing build failure as it's needed during hiltJavaCompile compilation task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants