aar2jar icon indicating copy to clipboard operation
aar2jar copied to clipboard

Could not create domain object 'compileOnlyAar'

Open eugene-krivobokov opened this issue 6 years ago • 2 comments

plugins {
    id("kotlin")
    id("com.stepango.aar2jar") version "0.6"
}

Error:

Caused by: java.lang.IllegalStateException: Could not create domain object 'compileOnlyAar' (Configuration)
       ...
Caused by: org.gradle.api.UnknownDomainObjectException: Extension of type 'JavaPluginConvention' does not exist. Currently registered extension types: [ExtraPropertiesExtension, KotlinJvmProjectExtension, KotlinTestsRegistry, DefaultArtifactPublicationSet]
        at org.gradle.internal.extensibility.ExtensionsStorage.getHolderByType(ExtensionsStorage.java:88)
        at org.gradle.internal.extensibility.ExtensionsStorage.getByType(ExtensionsStorage.java:74)
        at org.gradle.internal.extensibility.DefaultConvention.getByType(DefaultConvention.java:167)
        at com.stepango.aar2jar.Aar2JarKt$baseConfiguration$2.execute(Aar2Jar.kt:133)
        at com.stepango.aar2jar.Aar2JarKt$baseConfiguration$2.execute(Aar2Jar.kt)

You can reproduce it in this project: https://github.com/avito-tech/android-ui-testing/blob/master/ui-testing-core/build.gradle.kts

eugene-krivobokov avatar Sep 19 '19 15:09 eugene-krivobokov

Yeah, seen it before, you could try old fashioned way by specifying dep version in classpath

dependencies {
        classpath "gradle.plugin.com.stepango.aar2jar:aar2jar:0.6"
...
    }

Somehow it affects the way plugin get's applied

stepango avatar Sep 20 '19 07:09 stepango

Thanks, it helps

eugene-krivobokov avatar Sep 20 '19 09:09 eugene-krivobokov