stepango / aar2jar

Gradle plugin which will help you to add Aar dependencies into your java|kotlin modules
30 stars 10 forks source link

Could not create domain object 'compileOnlyAar' #5

Open eugene-krivobokov opened 5 years ago

eugene-krivobokov commented 5 years ago
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

stepango commented 5 years ago

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

eugene-krivobokov commented 5 years ago

Thanks, it helps