[Documentation] [TitleIndex] [WordIndex

UploadArchives Errors

Description

The android gradle plugin is still relatively young and doesn't behave perfectly with the java plugin. As a result, when uploading for a binary package you'll see this kind of error:

[ant:null] Error reading settings file '/tmp/gradle_empty_settings5104946485968637537.xml' - ignoring. Error was: /tmp/gradle_empty_settings5104946485968637537.xml (No such file or directory)

Solution

Don't worry about it - it has no effect on the build.

Workaround

If you're really fussy it can be eliminated with the following code and a change of task in the subprojects section of your root build.gradle file:

    task publishToMavenl() << {
        description = 'installs .aar files to the local maven repository.'
    }
    afterEvaluate { Project project ->
        if (plugins.findPlugin('android-library')) {
            publishToMaven.dependsOn('uploadArchives')
        }
    }

Alternatively, you could always feed it:

artifacts {  
    archives someFile  
}

2020-08-08 12:27