Android-Root-Coverage-Plugin icon indicating copy to clipboard operation
Android-Root-Coverage-Plugin copied to clipboard

rootCoverage is unresolved for kts gradle

Open amirraza opened this issue 1 year ago • 2 comments
trafficstars

I am trying to integrate in kotlin based project but unfortunately plugin is not showing up in gradle tasks.

How am I integrating?

//root project build.gradle.kts

plugins {
    alias(libs.plugins.androidApplication) apply false
    alias(libs.plugins.jetbrainsKotlinAndroid) apply false
    alias(libs.plugins.androidLibrary) apply false
    id("nl.neotech.plugin.rootcoverage") version "1.7.1" apply false
}

settings.gradle.kts

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url = uri("https://plugins.gradle.org/m2/") }
    }
}

AGP: 8.3.0 Gradle: 8.4 Kotlin: 1.9.0 Android Studio Iguana

Is there anything that I am missing?

amirraza avatar Mar 02 '24 13:03 amirraza

So, I managed to download plugin nl.neotech.plugin:android-root-coverage-plugin:1.8.0-SNAPSHOT and gradle tasks are now showing up but rootCoverage block is unresolved.

amirraza avatar Mar 02 '24 23:03 amirraza

can you try with Gradle 8.6?

tuan-le-skedulo avatar Mar 21 '24 14:03 tuan-le-skedulo

Sorry for this late response, for AGP 8.3.0 you indeed need to use the 1.8.0-SNAPSHOT.

However make sure you use apply true, for this plugin you must apply it at root level (unlike the android library/application plugin). Looking at your sample code you seem to be using apply false (which is thus wrong).

Rolf-Smit avatar Apr 10 '24 10:04 Rolf-Smit

Stable release 1.8.0 is now available.

I'm closing this issue, at it seems to be caused due to user error. Please reopen if issues remain.

Rolf-Smit avatar Apr 11 '24 19:04 Rolf-Smit