Question: I have just upgraded my Gradle to 5.x and I'm having a new error when I try to sync my library project. This error is coming from a publishing block that I need to publish my library to maven local.

This is what I used to do with Gradle 4 and it worked just fine :

```
apply plugin: 'maven-publish'
publishing {
    publications {
        library(MavenPublication) {
            groupId = 'myGroupId'
            artifactId = 'myArtifactId'
            version = android.defaultConfig.versionName

            artifact bundleDebugAar
        }
    }
}

```

With Gradle 5, I now have an error about the artifact when I sync the gradle project:

> 
> ERROR: Could not get unknown property 'bundleDebugAar' for object of
>  type
>  org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication.
> 
> 
> 

When I remove the artifact line, I can sync the project but when I'm trying to publishToMavenLocal my build is failing :

> 
> Execution failed for task
>  ':mypackage:generatePomFileForLibraryPublication'.
> 
> 
> 
> > 
> > No value has been specified for this provider.
> > 
> > 
> > 
> 
> 
> 

I looked in the gradle upgrading guide but I don't know how to solve my issue: <https://docs.gradle.org/5.0/userguide/upgrading_version_4.html#rel5.0:pom_compile_runtime_separation>

Can anybody tell me what's changed in this new version that I'm not seeing please ? Thanks.

Answer: 
You need at least gradle tools dependency `3.6.4`

```
 classpath 'com.android.tools.build:gradle:3.6.4'

```

I was using 3.5.4 which caused that exception
Try this.

Disables R8 for Android Library modules only.

`android.enableR8.libraries = false`

Disables R8 for all modules.

`android.enableR8 = false`