Skip to content

Commit

Permalink
Merge pull request #14 from AdamMc331/gh-pages
Browse files Browse the repository at this point in the history
Updated formatting on Eric's jcenter post.
  • Loading branch information
codeMagic23 committed May 31, 2017
2 parents 9c7556e + 96d79c7 commit f13c4ec
Show file tree
Hide file tree
Showing 2 changed files with 230 additions and 34 deletions.
200 changes: 200 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.7)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
colorator (1.1.0)
ethon (0.10.1)
ffi (>= 1.3.0)
execjs (2.7.0)
faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (134)
activesupport (= 4.2.7)
github-pages-health-check (= 1.3.3)
jekyll (= 3.4.3)
jekyll-avatar (= 0.4.2)
jekyll-coffeescript (= 1.0.1)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.9.2)
jekyll-gist (= 1.4.0)
jekyll-github-metadata (= 2.3.1)
jekyll-mentions (= 1.2.0)
jekyll-optional-front-matter (= 0.1.2)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.1.0)
jekyll-redirect-from (= 0.12.1)
jekyll-relative-links (= 0.4.0)
jekyll-sass-converter (= 1.5.0)
jekyll-seo-tag (= 2.2.0)
jekyll-sitemap (= 1.0.0)
jekyll-swiss (= 0.4.0)
jekyll-theme-architect (= 0.0.4)
jekyll-theme-cayman (= 0.0.4)
jekyll-theme-dinky (= 0.0.4)
jekyll-theme-hacker (= 0.0.4)
jekyll-theme-leap-day (= 0.0.4)
jekyll-theme-merlot (= 0.0.4)
jekyll-theme-midnight (= 0.0.4)
jekyll-theme-minimal (= 0.0.4)
jekyll-theme-modernist (= 0.0.4)
jekyll-theme-primer (= 0.1.8)
jekyll-theme-slate (= 0.0.4)
jekyll-theme-tactile (= 0.0.4)
jekyll-theme-time-machine (= 0.0.4)
jekyll-titles-from-headings (= 0.1.5)
jemoji (= 0.8.0)
kramdown (= 1.13.2)
liquid (= 3.0.6)
listen (= 3.0.6)
mercenary (~> 0.3)
minima (= 2.0.0)
rouge (= 1.11.1)
terminal-table (~> 1.4)
github-pages-health-check (1.3.3)
addressable (~> 2.3)
net-dns (~> 0.8)
octokit (~> 4.0)
public_suffix (~> 2.0)
typhoeus (~> 0.7)
html-pipeline (2.5.0)
activesupport (>= 2)
nokogiri (>= 1.4)
i18n (0.8.1)
jekyll (3.4.3)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-avatar (0.4.2)
jekyll (~> 3.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.2)
jekyll (~> 3.3)
jekyll-gist (1.4.0)
octokit (~> 4.2)
jekyll-github-metadata (2.3.1)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.2.0)
activesupport (~> 4.0)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-optional-front-matter (0.1.2)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.1.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.12.1)
jekyll (~> 3.3)
jekyll-relative-links (0.4.0)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-seo-tag (2.2.0)
jekyll (~> 3.3)
jekyll-sitemap (1.0.0)
jekyll (~> 3.3)
jekyll-swiss (0.4.0)
jekyll-theme-architect (0.0.4)
jekyll (~> 3.3)
jekyll-theme-cayman (0.0.4)
jekyll (~> 3.3)
jekyll-theme-dinky (0.0.4)
jekyll (~> 3.3)
jekyll-theme-hacker (0.0.4)
jekyll (~> 3.3)
jekyll-theme-leap-day (0.0.4)
jekyll (~> 3.3)
jekyll-theme-merlot (0.0.4)
jekyll (~> 3.3)
jekyll-theme-midnight (0.0.4)
jekyll (~> 3.3)
jekyll-theme-minimal (0.0.4)
jekyll (~> 3.3)
jekyll-theme-modernist (0.0.4)
jekyll (~> 3.3)
jekyll-theme-primer (0.1.8)
jekyll (~> 3.3)
jekyll-theme-slate (0.0.4)
jekyll (~> 3.3)
jekyll-theme-tactile (0.0.4)
jekyll (~> 3.3)
jekyll-theme-time-machine (0.0.4)
jekyll (~> 3.3)
jekyll-titles-from-headings (0.1.5)
jekyll (~> 3.3)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
jemoji (0.8.0)
activesupport (~> 4.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0)
json (1.8.6)
kramdown (1.13.2)
liquid (3.0.6)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.1.0)
minima (2.0.0)
minitest (5.10.1)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.23)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
terminal-table (1.7.3)
unicode-display_width (~> 1.1.1)
thread_safe (0.3.6)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.3)
thread_safe (~> 0.1)
unicode-display_width (1.1.3)

PLATFORMS
ruby

DEPENDENCIES
github-pages

BUNDLED WITH
1.14.6
64 changes: 30 additions & 34 deletions _posts/2015-11-05-How-to-publish-a-library-to-jcenter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: How to publish your libraries to JCenter()
post_author: Eric cugota
post_author: Eric Cugota
---

Searching on the internet how to publish a library into jcenter() can put one into trouble.
Expand All @@ -10,84 +10,80 @@ fear not, CptEric has a solution to this.

### Setting up Bintray

To get your api key you must be registered on bintray https://bintray.com
To get your api key you must be registered on [bintray](https://bintray.com).

You can find it on your user panel ( click in your name, click on edit, click on api key row).
You can find it on your user panel (click in your name, click on edit, click on api key row).

After that you have to create a new maven repository ( package name, image, description, github link, favourite coffee brand... )
After that you have to create a new maven repository (package name, image, description, github link, favourite coffee brand... )

### Configuring your library

First of all, you must have project with a library module setup.

Inside the library module’s (from now on, lib) build.gradle, you must add this just under apply plugin line :

```groovy
ext {

PUBLISH_GROUP_ID = 'com.yourpackagename'

PUBLISH_ARTIFACT_ID = 'yourmodulename'

PUBLISH_VERSION = '0.0.2'

}
```

#####Group id : your package name.

#####Artifact id : the thing you’re building, it has to match the module library name.
- Group id : your package name.
- Artifact id : the thing you’re building, it has to match the module library name.
- Publish version : no comment required, your current module version.

#####Publish version : no comment required, your current module version.

This , when uploaded, will allow you to put compile ‘com.cpteric:ericutils2:0.0.2' ( my example) on your gradle files.
This , when uploaded, will allow you to put compile `'com.cpteric:ericutils2:0.0.2'` (as an example) in your gradle files.

On the bottom of the file, you must put this line

######Apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
```groovy
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
```

Other tutorials will make you run a lot of clutter code and build a lot of methods in gradle, but that apply from does it automatically.
The only thing that's not cool about this approach is that you have to manually upload the zips.
But it's something i can live with if i don't have to create my own gradle upload script.

Now, go to your project build.gradle file and add this on dependencies :

######dependencies {

###### classpath 'com.android.tools.build:gradle:1.2.3'

###### classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'

###### classpath 'com.github.dcendents:android-maven-plugin:1.2'

######}
```groovy
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
```

This makes the prior apply from work.

Now on your local.properties file you must add this:

#####bintray.user=YOUR BINTRAY USERNAME
Now on your `local.properties` file you must add this:

#####bintray.apikey=YOUR BINTRAY API KEY
```groovy
bintray.user=YOUR BINTRAY USERNAME
bintray.apikey=YOUR BINTRAY API KEY
```

Once done, on the android studio terminal run the next sequence :

######./gradlew clean build generateRelease
```groovy
./gradlew clean build generateRelease
```

It will generate a zip.


### Publishing to Jcentral()

On your maven repository, click add new version, add the name you want to, add the number you want to, click accept, & enter into the version page.

Inside the general tab , on the right side, click add files via GUI, click on upload, add the generated zip, _and pick the checkbox that says explode on upload._

Click send, and after that, go to your package and click on the “ link to jcenter” ( bottom right).
Click send, and after that, go to your package and click on the “link to jcenter” (bottom right).

Fill the questionary, and it takes between some minutes up to 3 days to be accepted into the jcenter repository.

After that, you can find you package via
##### compile ‘com.cpteric:ericutils2:0.0.2’
or whatever you picked as 'package : Artifact : version'.
After that, you can find you package via `compile 'com.cpteric:ericutils2:0.0.2'` or whatever you picked as `'package : Artifact : version'`.


#### About the author
Expand Down

0 comments on commit f13c4ec

Please sign in to comment.