Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从4.9迁移到Gradle 5.3.1发布_Gradle_Android Gradle Plugin - Fatal编程技术网

从4.9迁移到Gradle 5.3.1发布

从4.9迁移到Gradle 5.3.1发布,gradle,android-gradle-plugin,Gradle,Android Gradle Plugin,我目前正在尝试将gradle包装器从4.9升级到5.3.1,我的PublishToAvenLocal不再工作。我从发行说明中就知道这会发生,但我不知道如何回到正常的水平。如何使用下面的代码在Gradle 5中进行发布 我已经在代码中添加了Gradle recommentafterEvaluate{}块。我在三个不同的位置进行了尝试,它们是下面代码中的(#) //代码块 publishing { publications { // Publish the Android A

我目前正在尝试将gradle包装器从4.9升级到5.3.1,我的PublishToAvenLocal不再工作。我从发行说明中就知道这会发生,但我不知道如何回到正常的水平。如何使用下面的代码在Gradle 5中进行发布

我已经在代码中添加了Gradle recomment
afterEvaluate{}
块。我在三个不同的位置进行了尝试,它们是下面代码中的(#)

//代码块

publishing {
    publications {
        // Publish the Android Archive and Javadoc (zip) all at once
        //   To publish javadocs with archive, add the line: 'artifact androidJavadocsZip' below the library variants loop

            androidArchive(MavenPublication) {
                artifacts {
                    description 'Configuration Cleaner android archive'
                    groupId 'fda dp22'
                    artifactId 'Cleaner'
                    version version
                    afterEvaluate {
                    android.libraryVariants.all { variant ->
                        variant.outputs.each { output ->
                            if (variant.name == "release" && output.name == "release") {
                                artifact output.outputFile
                            } else {
                                logger.debug("Skipping Output " + output.name + " of type " + variant.name + ".")
                            }
                        }
                    }

                    artifact androidJavadocsZip
                    artifact androidJavadocsJar
                }
            }
        }
    }
}