Skip to content

Commit

Permalink
Merge pull request #202 from DP-3T/feature/publish-develop-branch-to-…
Browse files Browse the repository at this point in the history
…jcenter

publish develop branch to jcenter
  • Loading branch information
simonroesch authored Sep 11, 2020
2 parents ef69d52 + 49b48c0 commit 73823b3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/bintray-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Upload AAR to bintray

on:
push:
branches: [ develop ]

jobs:
build:
name: "Upload AAR to bintray"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Upload
run: cd dp3t-sdk; ./gradlew bintrayUpload -PbintrayUser=${{secrets.BINTRAY_USER}} -PbintrayApikey=${{secrets.BINTRAY_APIKEY}} -PbintrayVersionSuffix=-dev-$GITHUB_RUN_NUMBER
17 changes: 11 additions & 6 deletions dp3t-sdk/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {
defaultConfig {
minSdkVersion 23
targetSdkVersion 30
versionCode 104
versionName "1.0.4"
versionCode 105
versionName "1.0.5"
testInstrumentationRunnerArgument 'androidx.benchmark.suppressErrors', 'EMULATOR,LOW-BATTERY,ACTIVITY-MISSING,DEBUGGABLE,UNLOCKED,UNSUSTAINED-ACTIVITY-MISSING'
testInstrumentationRunner "androidx.benchmark.junit4.AndroidBenchmarkRunner"

Expand Down Expand Up @@ -65,29 +65,34 @@ afterEvaluate {
from components.productionRelease
groupId 'org.dpppt'
artifactId 'dp3t-sdk-android'
version android.defaultConfig.versionName
version android.defaultConfig.versionName + readPropertyWithDefault('bintrayVersionSuffix', '')
artifact androidSourcesJar
}
"sdkCalibration"(MavenPublication) {
from components.calibrationRelease
groupId 'org.dpppt'
artifactId 'dp3t-sdk-android'
version android.defaultConfig.versionName + "-calibration"
version android.defaultConfig.versionName + readPropertyWithDefault('bintrayVersionSuffix', '') + "-calibration"
artifact androidSourcesJar
}
}
}
}

ext.readProperty = { paramName ->
ext.readProperty = { paramName -> readPropertyWithDefault(paramName, null) }
ext.readPropertyWithDefault = { paramName, defaultValue ->
if (project.hasProperty(paramName)) {
return project.getProperties().get(paramName)
} else {
Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}
return properties.getProperty(paramName)
if (properties.getProperty(paramName) != null) {
return properties.getProperty(paramName)
} else {
return defaultValue
}
}
}

Expand Down

0 comments on commit 73823b3

Please sign in to comment.