All Projects → beworker → Autoplay

beworker / Autoplay

Licence: apache-2.0
Gradle plugin for publishing Android artifacts to Google Play.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Autoplay

Bintray Publish
Super easy way to publish your Android and Java artifacts to bintray.
Stars: ✭ 97 (-51.74%)
Mutual labels:  gradle, publish
sonatype-publish-plugin
Gradle Plugin for publishing artifacts to Sonatype and Nexus
Stars: ✭ 17 (-91.54%)
Mutual labels:  gradle, publish
autoplay
Gradle plugin for publishing Android artifacts to Google Play.
Stars: ✭ 204 (+1.49%)
Mutual labels:  play, publish
Jitpack.io
Documentation and issues of https://jitpack.io
Stars: ✭ 2,156 (+972.64%)
Mutual labels:  gradle, publish
Richeditor
基于原生EditText+span实现的Android富文本编辑器
Stars: ✭ 191 (-4.98%)
Mutual labels:  gradle
Maven Git Versioning Extension
This extension will virtually set project versions, based on current git branch or tag.
Stars: ✭ 178 (-11.44%)
Mutual labels:  gradle
Gradle 3 User Guide
Gradle 3 User Guide 中文翻译《Gradle 3 用户指南》
Stars: ✭ 177 (-11.94%)
Mutual labels:  gradle
Netbeans Gradle Project
This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin.
Stars: ✭ 175 (-12.94%)
Mutual labels:  gradle
Boombeastic
A Raspberry Pi based smart connected speaker with support for airplay, spotify, mpd and local playback
Stars: ✭ 195 (-2.99%)
Mutual labels:  play
Gradledoc
Gradle 中文文档
Stars: ✭ 192 (-4.48%)
Mutual labels:  gradle
Mvvmtemplate
An Android Template with MVVM and Clean Architecture
Stars: ✭ 182 (-9.45%)
Mutual labels:  gradle
Render Media
Intelligently render media files in the browser
Stars: ✭ 181 (-9.95%)
Mutual labels:  play
Ddd Java
Spring Boot + Java [ DDD Sample ]
Stars: ✭ 191 (-4.98%)
Mutual labels:  gradle
Gradle Launch4j
A gradle-plugin to create windows executables with launch4j
Stars: ✭ 177 (-11.94%)
Mutual labels:  gradle
Acgn Community
A community app for news,animation,music and novels developed material design style.
Stars: ✭ 193 (-3.98%)
Mutual labels:  gradle
Click Debounce
Using ASM to handle Android's click debounce, specially a quick double click.
Stars: ✭ 175 (-12.94%)
Mutual labels:  gradle
Qmbform
Create simple Android forms
Stars: ✭ 184 (-8.46%)
Mutual labels:  gradle
Appaddupdate
Android app 增量更新
Stars: ✭ 192 (-4.48%)
Mutual labels:  gradle
Stubbornjava
Unconventional Java code for building web servers / services without a framework. Think dropwizard but as a seed project instead of a framework. If this project had a theme it would be break the rules but be mindful of your decisions.
Stars: ✭ 184 (-8.46%)
Mutual labels:  gradle
Play2 Hands On
Play2 + Slick / ScalikeJDBCを使ってWebアプリケーションを作成するハンズオンです。
Stars: ✭ 183 (-8.96%)
Mutual labels:  play

Build Status Maven Central Gradle License

autoplay

Autoplay

Gradle plugin for publishing Android artifacts to Google Play.

Features

  • Autoplay is optimized for CI/CD usage:

    • it does not trigger assembly task automatically - you can reuse build artifacts from previous build steps;
    • it accepts JSON key as base64-encoded string from external secure variables.
  • Autoplay is developer friendly:

    • it does not require storing any dummy keys in source control;
    • it has a single publish task for uploading artifacts (apk or app bundle) and release notes.
  • Autoplay is reliable and future-proof:

    • it has clean and concise implementation, which is easy to understand, extend and fix;
    • it's covered by unit tests;
    • it's built using latest tools and API's.

Usage

In the main build.gradle

buildscript {
  repositories {
    google()
    mavenCentral()
  }
  dependencies {
    classpath "de.halfbit:autoplay:<version>"
  }
}

Latest published version can be found at Maven central

Gradle compatibility

Gradle Version Autoplay Version
4.8.x 1.3.x
4.10.x 2.3.x
5.0.x 3.0.x

Publishing apk

In the application module's build.gradle

apply plugin: 'com.android.application'
apply plugin: 'android-autoplay'

autoplay {
    track "internal"
    secretJsonBase64 project.hasProperty('SECRET_JSON') ? project.property('SECRET_JSON') : ''
}

Execute ./gradlew tasks and you will see a new publishing task publishApk<BuildVariant> in the list. Autoplay adds this task for each build variant of release type. For a project without custom build flavors the task is named publishApkRelease.

Publishing app bundle

In the application module's build.gradle

apply plugin: 'com.android.application'
apply plugin: 'android-autoplay'

autoplay {
    track "internal"
    artifactType "bundle"
    secretJsonBase64 project.hasProperty('SECRET_JSON') ? project.property('SECRET_JSON') : ''
}

Execute ./gradlew tasks and you will see a new publishing task publishBundle<BuildVariant> in the list. Autoplay adds this task for each build variant of release type. For a project without custom build flavors the task is named publishBundleRelease.

Central build

Now you can call this task from a central build script. Here is an example of how to use it with Gitlab CI.

stages:
  - assemble
  - release

assemble:
  stage: assemble
  only:
    - master
  script:
    - ./gradlew clean bundleRelease -PSTORE_PASS=${STORE_PASS} -PKEY_PASS=${KEY_PASS}
  artifacts:
    paths:
      - app/build/outputs/

release:
  stage: release
  dependencies:
    - assemble
  only:
    - master
  script:
    - ./gradlew publishBundleRelease -PSECRET_JSON=${SECRET_JSON}

You can encode JSON key file into base64 string using following shell command (linux, mac)

base64 -i secret.json -o -

and provide the value to the build script using a protected variable.

Publishing Release Notes

Autoplay takes apk and obfuscation mapping files (or app bundle file, if artifactType "bundle" is set) for uploading from the default build output directories. Release notes are to be stored under src/main/autoplay/release-notes directory in accordance to the structure shown down below.

src
  +- main
       +- java
       +- autoplay
            +- release-notes
                 +- <track>           e.g. internal
                     +- <locale>.txt  e.g. en-US.txt

Properties

Autoplay supports following gradle.properties

Name Default Description
autoplay.connectTimeout 120000ms Connection establishment timeout in milliseconds.
autoplay.readTimeout 120000ms Connection reading timeout in milliseconds.

Happy continuous integration!

License

Copyright 2018-2019 Sergej Shafarenka, www.halfbit.de

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].