我试图将我的模块库中的一个制作成bintray和jcentre,这样我就可以使用compile thing编译其他项目了。
我之前从未这样做过,所以没有任何专业化。我确实谷歌了,发现了一些教程,这个看起来很不错。
https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
但不知怎的,我没能做到。我目前面临一些问题,但没有得到任何回复。请帮帮我..
问题: 1 GT;我正在使用Windows系统,因此我无法为ssh公钥执行gpg --gen-key事务。我有各种各样的理论,比如只有一个ssh公钥,因为我的系统中有git设置,所以基本上ssh键应该可以工作,但那不能用于这个程序。
2 - ;对于他们说使用cygwin的Windows,我对cygwin完全无能为力。
3>我试图跳过那部分并继续复制类路径,然后我不知道应该使用什么bintray.apikey。
4>之后它说要将这两行粘贴到文件的末尾 申请自:'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' 申请来自:'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
我再次无能为力?我尝试使用所有build.gradle文件都没有用。我尝试使用gradle包装器不起作用。
5个跳过那个,现在继续gradlew安装步骤,它给出了错误。
我有另一个链接,另一个教程 http://code.tutsplus.com/tutorials/creating-and-publishing-an-android-library--cms-24582
这个有点不同,我在这方面仍然面临一些问题。
我不知道在哪里添加工件部分。并且跳过该步骤会在安装时出错。
我完全失去了它。请帮忙..
编辑:现在我收到此错误
Error:Execution failed for task ':libraryutilities:install'.
无法发布配置'档案' 无法安装工件https://github.com/Aritra1704/UtilsLibrary:libraryutilities:aar:1.0.1:C:\ Users \ Aritra.m2 \ repository \ https:\ github \ com \ Aritra1704 \ UtilsLibrary \ libraryutilities \ 1.0.1 \ libraryutilities-1.0.1.aar(文件名,目录名称或卷标语法不正确)
我也打开了那个文件夹,它是空的,我可能做错了什么?
编辑2:
module build.gradle:
申请插件:'com.android.library'
\ text { bintrayRepo ='maven' bintrayName ='UtilitiesLibrary'
publishedGroupId = 'com.arpaul.libraryutilities'
libraryName = 'Utilities Library'
artifact = 'UtilitiesLibrary'
libraryDescription = 'Various utilities like Calendar date format, Data type conversion, Bitmap conversions.'
siteUrl = 'https://github.com/Aritra1704/UtilsLibrary'
gitUrl = 'https://github.com/Aritra1704/UtilsLibrary.git'
libraryVersion = '0.0.1'
developerId = 'aritra1704'
developerName = 'Aritra'
developerEmail = 'aritra1704@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'