Skip to content

Commit

Permalink
Merge pull request #26 from tumblr/publish-to-s3
Browse files Browse the repository at this point in the history
Publish to s3
  • Loading branch information
oguzkocer authored Feb 18, 2022
2 parents be2be67 + 9ce1b98 commit cf53561
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
common-params:
&docker-container
docker#v3.8.0:
image: "public.ecr.aws/automattic/android-build-image:v1.1.0"
propagate-environment: true
environment:
# DO NOT MANUALLY SET THESE VALUES!
# They are passed from the Buildkite agent to the Docker container
- "AWS_ACCESS_KEY"
- "AWS_SECRET_KEY"

steps:
- label: "Lint & Checkstyle"
key: "lint_and_checkstyle"
plugins:
- *docker-container
command: |
./gradlew lintRelease checkstyle
artifact_paths:
- "**/build/reports/lint-results**.*"
- "**/build/reports/checkstyle/checkstyle.*"

- label: "Publish to S3 Maven"
depends_on:
- "lint_and_checkstyle"
plugins:
- *docker-container
command: |
./gradlew \
:backboard:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
:backboard:publish
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

# Backboard

[![CircleCI](https://circleci.com/gh/tumblr/Backboard/tree/master.svg?style=svg)](https://circleci.com/gh/tumblr/Backboard/tree/master)

A motion-driven animation framework for Android.

`backboard` is a framework on top of [rebound](http://facebook.github.io/rebound/) that makes it easier to use by coupling it to views and motions.
Expand All @@ -19,6 +17,7 @@ A motion-driven animation framework for Android.
## Table of Contents

* [Usage](#usage)
* [Publishing a new version](#publishing-a-new-version)
* [Getting Started](#getting-started)
* [Performers](#performers)
* [Imitators](#imitators)
Expand All @@ -32,12 +31,33 @@ A motion-driven animation framework for Android.
Update your `build.gradle` with

```groovy
repositories {
exclusiveContent {
forRepository {
maven {
url "https://a8c-libs.s3.amazonaws.com/android"
}
}
filter {
includeModule "com.tumblr", "backboard"
}
}
}
dependencies {
compile 'com.facebook.rebound:rebound:0.3.8'
compile 'com.tumblr:backboard:0.1.0'
implementation 'com.facebook.rebound:rebound:0.3.8'
implementation 'com.tumblr:backboard:0.2.0'
}
```

## Publishing a new version

In the following cases, the CI will publish a new version with the following format to our S3 Maven repo:

* For each commit in an open PR: `<PR-number>-<commit full SHA1>`
* Each time a PR is merged to `master`: `master-<commit full SHA1>`
* Each time a new tag is created: `{tag-name}`

## Getting Started

Backboard is a framework on top of [rebound](http://facebook.github.io/rebound/) that manages how `Springs` are used and simplifies the
Expand Down
23 changes: 21 additions & 2 deletions backboard/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "com.android.library"
id "checkstyle"
id "com.automattic.android.publish-to-s3"
}

android {
Expand All @@ -9,8 +10,6 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 102
versionName "0.1.2"
}
buildTypes {
release {
Expand All @@ -28,6 +27,12 @@ android {
exclude '**/R.java'
}
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}

checkstyle {
Expand Down Expand Up @@ -66,3 +71,17 @@ dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
}

project.afterEvaluate {
publishing {
publications {
BackboardPublication(MavenPublication) {
from components.release

groupId "com.tumblr"
artifactId "backboard"
// version is set by 'publish-to-s3' plugin
}
}
}
}
8 changes: 8 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ pluginManagement {
plugins {
id "com.android.application" version gradle.ext.agpVersion
id "com.android.library" version gradle.ext.agpVersion
id "com.automattic.android.publish-to-s3" version "0.7.0"
}
repositories {
maven {
url 'https://a8c-libs.s3.amazonaws.com/android'
content {
includeGroup "com.automattic.android"
includeGroup "com.automattic.android.publish-to-s3"
}
}
google()
mavenCentral()
}
Expand Down

0 comments on commit cf53561

Please sign in to comment.