Android Studio上传项目作为lib到jcenter中
2016-02-02 11:12
603 查看
详细步骤请参考http://www.open-open.com/lib/view/open1435109824278.html
本文讲解示例为萌萌哒天团app
第一步
再添加之前必须在项目的根gradle中添加classpath,方能引入bintray的插件
第二步
如下是lib的gradle文件
第三步
在确保已经上传jcenter后,添加如下依赖
注:详细步骤还请参考如上网址。
本文讲解示例为萌萌哒天团app
第一步
再添加之前必须在项目的根gradle中添加classpath,方能引入bintray的插件
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' classpath 'com.github.dcendents:android-maven-plugin:1.2'
第二步
如下是lib的gradle文件
apply plugin: 'com.android.library' android { compileSdkVersion 17 buildToolsVersion "22.0.1" defaultConfig { minSdkVersion 8 targetSdkVersion 17 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } ext { bintrayRepo = 'maven' bintrayName = 'alipay_lib' publishedGroupId = 'com.yan' libraryName = 'alipay_lib' artifact = 'alipay_lib' libraryDescription = 'A wrapper for Facebook Native Like Button (LikeView) on Android' siteUrl = 'https://github.com/nuuneoi/FBLikeAndroid' gitUrl = 'https://github.com/nuuneoi/FBLikeAndroid.git' libraryVersion = '0.9.5' developerId = 'AndroidKing' developerName = 'yan' developerEmail = '******' licenseName = 'The Apache Software License, Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' allLicenses = ["Apache-2.0"] } apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
第三步
在确保已经上传jcenter后,添加如下依赖
compile 'com.yan:alipay_lib:0.9.5'
注:详细步骤还请参考如上网址。
相关文章推荐
- Android Studio 开发技巧汇集
- Android内存泄露分析
- android findViewById(...)的抽取
- android APK加固篇-2.动态加载dex及dex的方法的调用
- android adb技巧总结
- android 关于屏幕截屏的几种办法
- Android之RecyclerView简单使用(一)
- 如何选择 compileSdkVersion, minSdkVersion 和 targetSdkVersion
- Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRID
- Android Studio 关联项目软链接
- Android系统下的动态Dex加载
- Android使用DexClassLoader动态加载未安装Apk
- Android之代码设置selector
- Android学习-JAVA基础 (一)
- Android中Fragment添加容易遇到的问题
- Android两行代码搞定ViewPager的过渡动画
- Android禁止系统锁屏
- android拍照保存被压缩
- Android自定义权限
- Android获取CPU使用率的几种方式