Giter Club home page Giter Club logo

android-dependencies's Introduction

Gradle Dependency and Utils

Introduction

Project wide handling of tested and used libraries. Also including some utility gradle tasks.

Dependencies

The idea is to have all projects being up-to-date just by updating the dependency submodule.

Global variables

compileSdkVer
buildToolsVer
minSdkVer
targetSdkVer
kotlinVersion
supportLibVer
playServicesVer
firebaseVer
retrofitVersion
robolectricVersion

Gradle Plugins

ext.plugin

Gradle Library Plugins

ext.pluginLibrary

Gradle Libraries

ext.libs

Gradle Test Libraries

ext.testLibs

Gradle Android Test Libraries

ext.androidTestLibs

Gradle Configs

ext.configs

Utils

Exported Tasks

Gradle Wrapper

Mind the : in front of wrapper to execute task in root project instead of subproject.

gradle :wrapper

generateReleaseNotes

Meant to write end-user non technical release notes for automated store publications.

generateChangelog

Generates a file at ${project.rootDir}/app/src/main/assets/CHANGELOG.md including a list of all git commits with VSC hash link and commit user.

preBuild.dependsOn generateChangelogTask

copyReadme

Copies README.md to ${project.rootDir}/app/src/main/assets/

generateEnvironmentLog

Meant to debug build environment issues, never bundle it into a release version, due it may include build environment secrets.

Generates a file at ${project.rootDir}/app/src/main/assets/ENVIRONMENT.md including System.getenv()

preBuild.dependsOn generateEnvironmentLogTask

commitHash

Prints current commit hash.

commitCount

Prints amount of commits based on current branch. (Caution when using it for versionCode: it's meant for release branches, due every branches can have a higher number.)

simpleReleaseVersionName

Creating release version name. Format: major.minor.build.

canonicalReleaseVersionName

Creating release version name. Format: branch/major.minor.build-commithash

buildNumberByCI

Getting build number from Jenkins, Travis or Bitrise.

branchName

Getting branch name from CI or from git directly.

branchNameByCI

Getting build number from Jenkins, Travis or Bitrise.

branchNameByGit

Basically calls:

git rev-parse --abbrev-ref HEAD

To add tasks to preBuild

task('printEnvironmentTask') {
    println(System.getenv())
}

task('generateEnvironmentLogTask') {
     // generateEnvironmentLog() for debugging purposes
}

task('generateChangelogTask') {
    generateChangelog()
}

task('generateReleaseNotesTask') {
    generateReleaseNotes()
}

task copyReadme(type: Copy) {
    from "${project.rootDir}/README.md"
    into "${project.rootDir}/app/src/main/assets"
}

preBuild.dependsOn printEnvironmentTask
preBuild.dependsOn generateChangelogTask
preBuild.dependsOn generateReleaseNotesTask
preBuild.dependsOn copyReadme

bintray

apply from: "${project.rootDir}/Android-Dependencies/bintray.gradle"

bintray.properties

bintray.user=
bintray.apikey=
bintray.organization=
bintray.gpg.password=

binrtray.group =
binrtray.repo = 'maven'
binrtray.name =
bintray.licenses = 'MIT'

bintray.vcsUrl =
bintray.websiteUrl =
bintray.version.desc =

javadoc

apply from: "${project.rootDir}/Android-Dependencies/javadoc.gradle"

android-dependencies's People

Contributors

kibotu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.