Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
add release stage (via #33)
Browse files Browse the repository at this point in the history
  • Loading branch information
eroshenkoam authored Oct 3, 2019
1 parent 9045ad5 commit 13f3662
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 78 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to Bintray

on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: "Gradle Build"
run: ./gradlew build -Pversion=${GITHUB_REF:10}
- name: "Gradle Publish to Bintray"
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
run: ./gradlew bintrayUpload -Pversion=${GITHUB_REF:10}
11 changes: 0 additions & 11 deletions allure-android-commons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
apply plugin: 'kotlin'

buildscript {
apply from: '../gradle/versions.gradle'
apply from: '../gradle/common.gradle'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
}
}

dependencies {
implementation project(':allure-android-model')

Expand Down
11 changes: 0 additions & 11 deletions allure-android-model/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
apply plugin: 'kotlin'

buildscript {
apply from: '../gradle/versions.gradle'
apply from: '../gradle/common.gradle'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation "com.google.code.gson:gson:${gsonVersion}"
Expand Down
15 changes: 1 addition & 14 deletions allure-espresso/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
apply from: '../gradle/versions.gradle'
apply from: '../gradle/common.gradle'
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:${androidPlugin}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

Expand All @@ -21,7 +8,7 @@ android {
defaultConfig {
targetSdkVersion rootProject.compileSdkVersion
minSdkVersion rootProject.minSdkVersion
versionName rootProject.projectVersion
versionName version

testInstrumentationRunner "io.qameta.allure.espresso.AllureAndroidRunner"
}
Expand Down
58 changes: 53 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,61 @@
apply from: 'gradle/common.gradle'
apply from: 'gradle/versions.gradle'
buildscript {
repositories {
google()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}

dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.51'
classpath 'com.android.tools.build:gradle:3.2.0'
}
}
ext {
gradleScriptDir = "${rootProject.projectDir}/gradle"
compileSdkVersion = 28
minSdkVersion = 18
buildToolsVersion = '28.0.2'

gsonVersion = '2.8.0'

hamcrestVersion = '1.3'
androidXVersion = '1.0.0'
androidXTestVersion = '1.2.0'
multidexVersion = '2.0.1'
jUnitVersion = '4.12'
uiAutomatorVersion = '2.2.0'
espressoVersion = '3.1.0'

androidPlugin = '3.2.0'
versionsPlugin = '0.11.3'
kotlinVersion = '1.2.51'
dexCountVersion = '0.8.1'
}

apply from: 'gradle/bintray.gradle'

allprojects {
apply plugin: "idea"
group 'io.qameta.allure'
version = version

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
}

repositories {
google()
jcenter()
}
}

subprojects { project ->

apply plugin: 'maven'

apply from: "${gradleScriptDir}/common.gradle"

group 'io.qameta.allure.android'
version = rootProject.projectVersion
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version=2.0-SNAPSHOT

org.gradle.jvmargs=-Xms1024m -Xmx2g -XX:ReservedCodeCacheSize=512m
android.enableJetifier=true
android.useAndroidX=true
28 changes: 28 additions & 0 deletions gradle/bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apply plugin: 'com.jfrog.bintray'

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')

configurations = ['archives']

publish = true
pkg {
userOrg = 'qameta'
repo = 'maven'
name = 'allure-android'
desc = 'Allure Android'
websiteUrl = 'https://github.com/allure-framework/allure-android'
issueTrackerUrl = 'https://github.com/allure-framework/allure-android'
vcsUrl = 'https://github.com/allure-framework/allure-android.git'
licenses = ['Apache-2.0']

version {
name = project.version
released = new Date()
gpg {
sign = true
}
}
}
}
8 changes: 0 additions & 8 deletions gradle/common.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
allprojects {
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
}
}
55 changes: 55 additions & 0 deletions gradle/maven.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apply plugin: 'maven'

install {
repositories.mavenInstaller {
customizePom(pom, project)
}
}

def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// eliminate test-scoped dependencies (no need in maven central poms)
generatedPom.dependencies.removeAll { dep ->
dep.scope == "test"
}

// sort to make pom dependencies order consistent to ease comparison of older poms
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
"$dep.scope:$dep.groupId:$dep.artifactId"
}

// add all items necessary for maven central publication
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
url = "https://github.com/allure-framework/allure-android"
organization {
name = "Qameta IO"
url = "https://qameta.io"
}
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/allure-framework/allure-android'
connection = 'scm:git:git://github.com/allure-framework/allure-android'
developerConnection = 'scm:git:git://github.com/allure-framework/allure-android'
}
developers {
developer {
id = 'eroshenkoam'
name = 'Artem Eroshenko'
email = 'eroshenkoam@qameta.io'
}
}
issueManagement {
system = 'Github Issues'
url = 'https://github.com/allure-framework/allure-android/issues'
}
}
}
}
29 changes: 0 additions & 29 deletions gradle/versions.gradle

This file was deleted.

0 comments on commit 13f3662

Please sign in to comment.