forked from novoda/bintray-release
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from StefMa/feature/use_android_artifacts
Use android artifacts
- Loading branch information
Showing
37 changed files
with
321 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: | ||
image: circleci/classic:latest | ||
|
||
environment: | ||
# Customize the JVM maximum heap limit | ||
# Needs to be updated along with gradle jvmargs 👇 | ||
_JAVA_OPTIONS: "-Xmx2g" | ||
|
||
steps: | ||
- checkout | ||
|
||
# Set the JVM heap size to gradle as well | ||
- run: echo "org.gradle.jvmargs=-Xmx2G" >> gradle.properties | ||
|
||
# Download/Install Android SDK for testing | ||
- run: wget -q https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip | ||
- run: unzip -q sdk-tools-linux-3859397.zip | ||
- run: mkdir $HOME/android-sdk | ||
- run: mv tools $HOME/android-sdk/tools | ||
- run: mkdir $HOME/android-sdk/licenses | ||
- run: echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" > "$HOME/android-sdk/licenses/android-sdk-license" | ||
- run: echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$HOME/android-sdk/licenses/android-sdk-preview-license" | ||
|
||
# Try to restore cache (see ho to save cache below 👇) | ||
- restore_cache: | ||
key: gradle-cache-v0-{{ checksum "build.gradle" }}-{{ checksum "core/build.gradle" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }} | ||
|
||
- run: | ||
environment: | ||
ANDROID_HOME: "/home/circleci/android-sdk" # TODO: Try to don't hardcode me and use $HOME env variable | ||
command: ./gradlew test --no-daemon | ||
|
||
# Save the gradle folder for caching | ||
- save_cache: | ||
paths: | ||
- ~/.gradle | ||
key: gradle-cache-v0-{{ checksum "build.gradle" }}-{{ checksum "core/build.gradle" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }} | ||
|
||
- run: | ||
command: | | ||
cd samples | ||
echo "sdk.dir=$HOME/android-sdk" >> local.properties | ||
./gradlew clean build bintrayUpload -PbintrayUser=user -PbintrayKey=secret -PdryRun=true --info | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,72 @@ | ||
# bintray-release [![](https://ci.novoda.com/buildStatus/icon?job=bintray-release)](https://ci.novoda.com/job/bintray-release/lastBuild/console) [![Download](https://api.bintray.com/packages/novoda/maven/bintray-release/images/download.svg) ](https://bintray.com/novoda/maven/bintray-release/_latestVersion) [![](https://raw.githubusercontent.com/novoda/novoda/master/assets/btn_apache_lisence.png)](LICENSE.txt) | ||
|
||
Super duper easy way to release your Android and other artifacts to bintray. | ||
[![CircleCI](https://circleci.com/gh/StefMa/bintray-release.svg?style=svg)](https://circleci.com/gh/StefMa/bintray-release) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
# BintrayRelease | ||
A super duper easy way to release your Android and Java artifacts to [Bintray](https://bintray.com). | ||
|
||
|
||
## Description | ||
This is a helper for releasing Android and Java libraries to Bintray. | ||
Basically it is "just" a wrapper around the [Gradle-Bintray-Plugin](https://github.com/bintray/gradle-bintray-plugin) and the [AndroidArtifacts Plugin](https://github.com/StefMa/AndroidArtifacts). | ||
|
||
This is a helper for releasing libraries to bintray. It is intended to help configuring stuff related to maven and bintray. | ||
At the moment it works with Android Library projects, plain Java and plain Groovy projects, but our focus is to mainly support Android projects. | ||
The Plugin configure all artifacts for you and hock it into the `Gradle-Bintay-Plugin`. | ||
|
||
## Adding to project | ||
At this time of writing it supports "all Android" libraries which will be supported by the `AndroidArtifacts` Plugin. | ||
Beside of that it will create artifacts for Java libraries. But later this should be part of the `AndroidArtifacts` Plugin. | ||
|
||
To publish a library to bintray using this plugin, add these dependencies to the `build.gradle` of the module that will be published: | ||
## How to use it | ||
### Apply the Plugin | ||
Put the following lines to your **project** `build.gradle`: | ||
|
||
```groovy | ||
apply plugin: 'com.novoda.bintray-release' // must be applied after your artifact generating plugin (eg. java / com.android.library) | ||
apply plugin: "com.android.library" | ||
apply plugin: "guru.stefma.bintrayrelease" //1 | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
dependencies { | ||
classpath 'com.novoda:bintray-release:<latest-version>' | ||
// The current version can be found here https://git.io/fNUnx | ||
classpath "guru.stefma.bintrayrelease:bintrayrelease:$bintrayReleaseVersion" | ||
} | ||
} | ||
``` | ||
|
||
## Simple usage | ||
|
||
Use the `publish` closure to set the info of your package: | ||
### Configure the `publish` extension | ||
The Plugin brings a `publish` extension which needs to be setup in your **module** `build.gradle` in the following way: | ||
|
||
```groovy | ||
version = "1.0.0" | ||
group = "guru.stefma.bintrayrelease" | ||
publish { | ||
userOrg = 'novoda' | ||
groupId = 'com.novoda' | ||
artifactId = 'bintray-release' | ||
publishVersion = '0.6.1' | ||
userOrg = 'stefma' | ||
artifactId = 'bintrayrelease' | ||
desc = 'Oh hi, this is a nice description for a project, right?' | ||
website = 'https://github.com/novoda/bintray-release' | ||
website = 'https://github.com/stefma/bintray-release' | ||
} | ||
``` | ||
|
||
If you use [Kotlin DSL](https://github.com/gradle/kotlin-dsl) use: | ||
|
||
```kotlin | ||
import com.novoda.gradle.release.PublishExtension | ||
configure<PublishExtension> { | ||
userOrg = "novoda" | ||
groupId = "com.novoda" | ||
artifactId = "bintray-release" | ||
publishVersion = "0.6.1" | ||
desc = "Oh hi, this is a nice description for a project, right?" | ||
website = "https://github.com/novoda/bintray-release" | ||
} | ||
``` | ||
|
||
### Publish | ||
Finally, use the task `bintrayUpload` to publish (make sure you build the project first!): | ||
|
||
```bash | ||
$ ./gradlew clean build bintrayUpload -PbintrayUser=BINTRAY_USERNAME -PbintrayKey=BINTRAY_KEY -PdryRun=false | ||
``` | ||
./gradlew clean build bintrayUpload -PbintrayUser=BINTRAY_USERNAME -PbintrayKey=BINTRAY_KEY -PdryRun=false | ||
``` | ||
|
||
More info on the available properties and other usages in the [Github Wiki](https://github.com/novoda/bintray-release/wiki). | ||
|
||
## Gradle compatibility | ||
| bintray-release version | Java Projects | Android Projects | | ||
|-------------------------|---------------|------------------| | ||
| 0.8.* | Gradle 4.0+ | Gradle 4.1+ | | ||
|
||
> **Notes:** Currently Gradle 4.5 doesn't work with Android projects | ||
## About the Fork | ||
This is a fork of the original [`bintray-release`](https://github.com/novoda/bintray-release) of [**novoda**](https://novoda.com/). | ||
I started to create and maintain this fork (instead of contribute there) because I wanted to have the "full control" over the project. | ||
Beside of this this fork use another Plugin as dependency which I've developed by myself. To keep it regularly in sync with | ||
the "upstream Plugin" I thought it is easy to have a Plugin which is owned by me. | ||
|
||
## Links | ||
### License | ||
Because it is a fork of the `bintray-release` (which is original licensed under the `Apache-2`) I decided to license these | ||
Plugin under the Apache-2 as well. | ||
|
||
Here are a list of useful links: | ||
I don't want to violence the Apache-2. But I'm also not a lawyer. Because of this - and the lack of knowledge - I decided to keep | ||
**novoda** inside the [LICENSE](LICENSE.txt). | ||
|
||
* We always welcome people to contribute new features or bug fixes, [here is how](https://github.com/novoda/novoda/blob/master/CONTRIBUTING.md) | ||
* If you have a problem check the [Issues Page](https://github.com/novoda/bintray-release/issues) first to see if we are working on it | ||
* For further usage or to delve more deeply checkout the [Project Wiki](https://github.com/novoda/bintray-release/wiki) | ||
* Looking for community help, browse the already asked [Stack Overflow Questions](http://stackoverflow.com/questions/tagged/support-bintray-release) or use the tag: `support-bintray-release` when posting a new question | ||
But not all code in this Plugin is original "novoda code". I started the fork at the commit [`0d998ad`](https://github.com/StefMa/bintray-release/commit/0d998ad9cf4f822be2bcbffaf02bbee881f13101). | ||
Feel free to compare the latest version with the commit to see a diff about "what is new and what is original novoda software". |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
core/src/main/groovy/com/novoda/gradle/release/AndroidArtifacts.groovy
This file was deleted.
Oops, something went wrong.
82 changes: 0 additions & 82 deletions
82
core/src/main/groovy/com/novoda/gradle/release/AndroidLibrary.groovy
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.