我们有一个带有构建脚本的Kotlin多平台库项目,该构建脚本使用“旧式”子项目的结构和流程为各种平台(即通用JS和JVM)构建。在此系统下,产生的工件可以成功上传到我们的Sonatype Nexus存储库(根build.gradle包含在下面的(1)中)。
现在,我们试图转换为“新型”的Kotlin多平台方法/结构(使用Gradle构建多平台项目),但是当我们尝试将工件上传到仓库(修改后的根版本)时,出现以下错误.gradle包含在以下(2)中):
BUILD FAILED in 0s
8 actionable tasks: 1 executed, 7 up-to-date
A POM cannot have multiple artifacts with the same type and classifier. Already have MavenArtifact objjson-metadata:jar.asc:asc:null, trying to add MavenArtifact objjson-metadata:jar.asc:asc:null.
10:36:52: Task execution finished 'uploadArchives'.
Run Code Online (Sandbox Code Playgroud)
有谁知道我们为什么会收到此错误?
构建期间创建的每个工件的设置似乎都需要在脚本中进行更新,但是我们不确定如何执行此操作。
提前致谢!
(1)原始(“旧式”多平台)根build.gradle:
buildscript {
ext.kotlinVersion = '1.2.61'
repositories {
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}
plugins {
id 'io.codearte.nexus-staging' version '0.11.0'
}
allprojects {
group 'nz.salect.objJSON' …Run Code Online (Sandbox Code Playgroud)