我正在尝试将我的库发布到 jcenter。但是当我跑步时
gradlew install
我得到:安装工件时出错https://github.com/vishnus1224/CircularProgressIndicator:library:aar:安装工件时出错:文件名、目录名或卷标语法不正确。
我的图书馆在 github 上的位置在这里
这是我的 build.gradle 文件
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version = "1.0"
android {
compileSdkVersion 21
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 11
targetSdkVersion 21
versionCode 1
versionName version
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
def siteUrl = 'https://github.com/vishnus1224/CircularProgressIndicator'
def gitUrl = 'https://github.com/vishnus1224/CircularProgressIndicator.git'
group = "https://github.com/vishnus1224/CircularProgressIndicator"
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'Displays the progress in a circle with animation along with the progress percentage.'
url siteUrl
// Set your license
licenses {
license {
name 'MIT'
url 'http://opensource.org/licenses/MIT'
}
}
developers {
developer {
id 'vishnus1224'
name 'Vishnu Shirodker'
email 'vishnus1224@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStre am())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = "CircularProgressIndicator"
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["MIT"]
publish = true
}
}
请帮忙。
更新:我想做的就是使用任何可能的方法将库推送到 jcenter。