出版物指定(S),但没有出版物项目存在:库 [英] Publications(s) specified but no publications exist in project :library
问题描述
我想我的图书馆上传到 JCenter库。
我跟着这个教程:
https://www.virag.si / 2015/01 /出版-gradle这个功能的Android库到jcenter /
我的的build.gradle 作为库运行后的的 gradlew bintrayUpload 的命令。
应用插件:'com.android.library
应用插件:'com.github.dcendents.android-行家
应用插件:'com.jfrog.bintray//这是部署神器时使用的库版本
版本=1.0.0安卓{
compileSdkVersion 22
buildToolsVersion22.0.1defaultConfig {
8的minSdkVersion
targetSdkVersion 22
版本code 1
的versionName1.0
}
buildTypes {
发布 {
minifyEnabled假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
}
}
}依赖{
编译文件树(导演:'库',包括:['的* .jar'])
编译com.android.support:appcompat-v7:22.0.0
}高清SITEURL ='https://github.com/vipulasri/Layout-to-Image
高清gitUrl ='https://github.com/vipulasri/Layout-to-Image.git
组=com.github.vipulasri安装{
repositories.mavenInstaller {
//这将生成的pom.xml有合适的参数
POM {
项目{
包装AAR //添加您的描述在这里
命名布局到图像
说明=该项目旨在将Android布局XML转换为图片
网址SITEURL //设置许可证
许可证{
执照 {
名称Apache软件许可证,版本2.0
URL'http://www.apache.org/licenses/LICENSE-2.0.txt
}
}
开发商{
开发商{
ID'vipulasri
名称'VIPUL阿斯里
电子邮件'vipulasri.2007@gmail.com
}
}
SCM {
连接gitUrl
developerConnection gitUrl
网址SITEURL }
}
}
}
}
依赖{
}任务sourcesJar(类型:罐){
从android.sourceSets.main.java.srcDirs
分类='源'
}任务的javadoc(类型:Javadoc中){
来源= android.sourceSets.main.java.srcDirs
类路径+ = project.files(android.getBootClasspath()。加入(File.pathSeparator))
}任务javadocJar(类型:罐,dependsOn:的javadoc){
分类='的javadoc'
从javadoc.destinationDir
}
文物{
档案javadocJar
档案sourcesJar
}任务findConventions<< {
的println project.getConvention()
}
属性属性=新的属性()
properties.load(project.rootProject.file('local.properties')。newDataInputStream())
bintray {
用户= properties.getProperty(bintray.user)
键= properties.getProperty(bintray.apikey)
配置= ['档案']PKG {
回购=行家
//这是登录时出现在bintray名
NAME =layouttoimage
websiteUrl = SITEURL
vcsUrl = gitUrl
许可证= ['Apache的2.0']
发布=真}
}
我得到了以下错误:
出版物指定(S),但没有出版物项目存在:库。
:应用:bintrayUpload失败故障:建立失败,一个例外。* 什么地方出了错:
被发现任务的配置一些问题:应用程序:bintrayUpload。
>没有价值的财产指定的packageName。
>没有价值的财产指定repoName。
>没有价值已被指定为财产apiKey。
>没有价值已被指定为财产用户。*尝试:
与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项来运行,以获得更多的日志输出。构建失败
我刚刚遇到这种问题,我的解决方案是,编辑项目顶部的build.gradle,使类路径com.jfrog.bintray。 gradle这个:gradle这个-bintray - 插件:1.2
,并禁用 // {插件
// IDcom.jfrog.bintray版本1.2
//}
这对我的作品,希望对你有所帮助。
I am trying to upload my Library to JCenter Repository . I followed this tutorial :
https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/
My build.gradle for library after running gradlew bintrayUpload command.
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
// This is the library version used when deploying the artifact
version = "1.0.0"
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}
def siteUrl = 'https://github.com/vipulasri/Layout-to-Image'
def gitUrl = 'https://github.com/vipulasri/Layout-to-Image.git'
group = "com.github.vipulasri"
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'Layout to Image'
description = 'The project aims to convert your Android Layout Xml to Image'
url siteUrl
// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'vipulasri'
name 'Vipul Asri'
email 'vipulasri.2007@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
dependencies {
}
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
}
task findConventions << {
println project.getConvention()
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
// it is the name that appears in bintray when logged
name = "layouttoimage"
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ['Apache-2.0']
publish = true
}
}
I got Following error :
Publications(s) specified but no publications exist in project :library.
:app:bintrayUpload FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':app:bintrayUpload'.
> No value has been specified for property 'packageName'.
> No value has been specified for property 'repoName'.
> No value has been specified for property 'apiKey'.
> No value has been specified for property 'user'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I just encouter this problem, my solution is, edit the project top build.gradle, enable classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
, and disable //plugins {
// id "com.jfrog.bintray" version "1.2"
//}
It works for me, hope helpful for you.
这篇关于出版物指定(S),但没有出版物项目存在:库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!