jcenter

教你把自己Adnroid代码上传到JCenter

五迷三道 提交于 2019-12-03 00:08:54
##上传项目到JCenter //引用方式如下 compile '项目组ID:项目名称:项目版本号' //引用示例 compile 'com.android.support:recyclerview-v7:23.3.0' 1.去JCenter官网注册个账号,这里有一个问题,就是国内的邮箱好像不行,xxxxxxx@163.com xxxxxx@qq.com都不可以。 这里推荐一个:outlook邮箱。…… 因为我就是用这个的 (´・_・`) 当时找了好久才找到 JCenter注册地址 https://bintray.com/signup/oss 2.新建一个项目: [Add New Repository] → Name:填写 maven → Type:选择 Maven → 点击:Create 3.鼠标移到右上角,你的账号上,会自动下拉出一个列表: 点击 Edit Profile ** → 点击 : [API Key] → 输入你的密码,就能得到你的 [API Key]**,复制保存下来以后会用到 ###编辑你的项目 Module的 build.gradle apply plugin: 'com.android.library' apply plugin: 'maven' apply plugin: 'com.novoda.bintray-release' android { ...

扫盲Android Studio 仓库jCenter并发布自己的开源库

China☆狼群 提交于 2019-12-03 00:08:41
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/u013231041/article/details/70174354 AS从哪里获取到开源库 首先我们在使用第三方开源库时,直接在项目的 gradle 文件中添加这样一行代码: compile 'com.jakewharton:butterknife:7.0.1' 添加完之后,你会发现依懒库中确实出现了这个库文件,那么 AS 具体是去哪里下载这个库的呢? jcenter 细心的话会发现项目根目录的 gradle 文件里面有这样的配置 allprojects { repositories { jcenter() } } 1 2 3 4 5 这代码的作用就是告诉 AS 使用 jcenter 作为代码仓库! jcenter 就是 Android library 文件服务器中的其中一个,另外一个就是 Maven Central,这两个都是Maven 仓库。 jcenter 由 bintray.com 维护 , Maven Central 则是由 sonatype.org 维护,它们分别存储在不同的服务器,两者没有任何关系。在 http://jcenter.bintray.com/ 可以看到 jcenter 整个仓库的内容。

FileDownloader 很棒的文件下载库

假装没事ソ 提交于 2019-12-03 00:08:28
有一个很好用的文件下载库,这里做个记录; 1、内容大纲 文件库源码导入项目 com.jfrog.bintray的作用 2、文件下载开源库使用 先说说这个这个优秀文件下载开源库: FileDownloader 下面是部分展示效果,直接引入就好 可以直接将源码从git上下载下来后的目录结构如下 我们可以把library直接copy到我们的项目中作为一个依赖库使用,但是还需要我们对便以文件进行修改如下: 2.1、先去掉下面三个插件 2.2、去掉依赖库中对插件的依赖,直接删掉 apply from: rootProject.file('gradle/mvn-push.gradle') 2.3、删掉项目build.gradle文件中的 classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' 如下图 2.4、为什么要去掉这几个插件 这几个插件是可以去掉的,为什么?需要了解com.jfrog.bintray是做什么用的 com.jfrog.bintray实际上是开源项目用来将打成的库包提交到Maven Central或者Jcenter的插件,是可以去掉的。 3、bintray 3.1、Android项目依赖包是怎么导入的 在 AS(Android Studio )中,我们可以很方便的通过gradle 来导入第三方库

将项目通过Android Studio发布到Jcenter仓库

匿名 (未验证) 提交于 2019-12-03 00:05:01
什么是Jcenter仓库? 个人认为Jcenter类似于git/svn,是一个项目管理工具,我们可以用它存储一些公共的组件,类库,插件等实现共享功能,同时我们可以对其版本进行控制。那我们在项目的开发过程,当需要某个组件或类库,直接依赖即可,无需复制代码,或依赖一个module了,基本是一句代码可以搞定。 如何将我们的项目发布到JCenter进行共享了? 使用Bintray将项目发布到JCenter 如何配置? 将项目上传到Jcenter,我们需要配置一些插件,常用的有两种 gradle-bintray-plugin(配置麻烦) bintray-release(推荐 配置简单,但是现在支持5.0以下的gradle,好像不太支持gradle5.0以上,会出现错误 ) 如何使用bintray-release来将项目发布到Jcenter? 1.注册开发者账号,在这里要注意账号体系分为企业账号和普通开发者账号的,企业账号有一个月的试用期限,在刚注册的一个月内,是不能将项目发布到Jcenter的(不提供add to Jcenter按钮),所以我们在注册的时候需要注意了。 官网链接: https://bintray.com/ 2.到github获取bintray-release的版本 github地址: https://github.com/novoda/bintray-release 3

Gradle配置国内镜像

匿名 (未验证) 提交于 2019-12-02 23:43:01
2019独角兽企业重金招聘Python工程师标准>>> 使用阿里云国内镜像 单个项目配置,在项目中的build.gradle修改内容 buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } }

Gradle

谁说胖子不能爱 提交于 2019-12-02 11:27:12
Gradle与Ant、Maven类似,是一种项目构建工具,之前使用的Eclipse是使用Ant来实现项目构建的。在AS中第一次创建项目的时候,会自动下载Gradle在AS中第一次创建项目的时候,会自动下载Gradle。不过对国外的网站,网速太慢。 使用本地已经下载好的gradle版本:File->Settings->搜索gradle,默认下载路径为本机用户下的那个.gradle里面。让Android Studio先自行下载一会Gradle,这样可以确定Gradle的安装目录和Gradle的版本。 从Gradle的官网上下载指定的版本(不一定是最新的,我安装的Android Studio需要的是gradle-2.4版本),然后将下载的zip包扔到那个无规律字符串目录下。记住:不需要解压,android studio自己会去解包。 项目gradle文件介绍: 1、MyApplication/app/build.gradle 整个项目最主要的gradle配置文件 //声明是Android程序,以前的写法:apply plugin: ‘android’,每一个Module都需要有一个gradle配置文件,语法都是一样,唯一不同的是开头声明的是 apply plugin: ‘com.android.library’(如果由其他的module) apply plugin: 'com

JCenter and Bintray not in Sync

五迷三道 提交于 2019-12-02 06:39:01
问题 I published a Scala library in Bintray, for Scala 2.11 and 2.10 But in JCenter, it is only available the Scala 2.10 version. I thought that it was in sync automatically, but looks like I was wrong. Any idea how to sync both repositories? 回答1: Usually when changing the artifact path you won't be able to resolve your content through JCenter although it was previously included. The reason for this is that the inclusion of your scala library in JCenter is for the files’ path. Therefore, it was

JCenter and Bintray not in Sync

微笑、不失礼 提交于 2019-12-02 05:47:57
I published a Scala library in Bintray , for Scala 2.11 and 2.10 But in JCenter , it is only available the Scala 2.10 version. I thought that it was in sync automatically, but looks like I was wrong. Any idea how to sync both repositories? Usually when changing the artifact path you won't be able to resolve your content through JCenter although it was previously included. The reason for this is that the inclusion of your scala library in JCenter is for the files’ path. Therefore, it was originally included under the path prefix 'com/acervera/osm4scala/osm4scala-core_2.10'. However, we have re

Trouble Publishing Android Studio Library on jCenter with Bintray

半腔热情 提交于 2019-12-02 00:42:51
I'm following this tutorial to publish an example Android Studio library on Jcenter: http://crushingcode.co/publish-your-android-library-via-jcenter/ It seems very clear. I've created my GitHub repository with this library at this link: https://github.com/alessandroargentieri/mylibview I've also Signed in to Bintray.com, and created a new repository which must contain my library (as explained in the tutorial above). To publish a repository on Bintray I must create an organisation, then you create the repository. So these are my data: Bintray username: alessandroargentieri organisation:

将Android Studio开源项目提交到JCenter

对着背影说爱祢 提交于 2019-12-01 15:45:07
在 bintray 注册账号; 在 edit 记住你的name和API KEY,可以把这些信息放在local.properties文件中; //local.properties sdk.dir=/Applications/ADT/sdk bintray.user = *** bintray.apikey = ************************* 配置工程的build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }