Skip to content

Commit

Permalink
Release version 0.9.3 with automated generation of versionCode and ve…
Browse files Browse the repository at this point in the history
…rsionName
  • Loading branch information
fmeum committed Dec 7, 2019
1 parent 31980c7 commit 8b1c48a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions authenticator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ android {
applicationId "me.henneke.wearauthn.authenticator"
minSdkVersion 28
targetSdkVersion 29
versionCode 228092
versionName "0.9.2"
versionCode makeVersionCode(minSdkVersion.apiLevel, true)
versionName makeVersionName()
}
buildTypes {
release {
Expand Down
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

ext.versionMajor = 0
ext.versionMinor = 9
ext.versionPatch = 3

buildscript {
ext.kotlin_version = '1.3.61'
repositories {
Expand All @@ -23,6 +27,22 @@ allprojects {
}
}

private Integer makeVersionCode(int minSdkVersion, boolean wear) {
long version = minSdkVersion * 1000000 +
ext.versionMajor * 10000 +
ext.versionMinor * 100 +
ext.versionPatch
if (wear) {
return 100000000 + version
} else {
return version
}
}

private String makeVersionName() {
return "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
}

task clean(type: Delete) {
delete rootProject.buildDir
}
4 changes: 2 additions & 2 deletions companion/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "me.henneke.wearauthn.authenticator"
minSdkVersion 21
targetSdkVersion 29
versionCode 129092
versionName "0.9.2"
versionCode makeVersionCode(minSdkVersion.apiLevel, false)
versionName makeVersionName()
}
signingConfigs {
testSign {
Expand Down
2 changes: 1 addition & 1 deletion companion/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources>
<string name="app_name">WearAuthn</string>
<string name="changelog"><![CDATA[<h4>Recent changes</h4><b>Version 0.9.2</b><br/>• Fix a crash when the NFC state changes<br/><br/><b>Version 0.9.1</b><br/>• Verify master key signatures in constant time]]></string>
<string name="changelog"><![CDATA[<h4>Recent changes</h4><b>Version 0.9.3</b><br/>• Updated Android libraries<br/>• Fix the visibility of the NFC settings icon<br/><br/><b>Version 0.9.2</b><br/>• Fix a crash when the NFC state changes<br/><br/><b>Version 0.9.1</b><br/>• Verify master key signatures in constant time]]></string>
<string name="url_new_issue">https://github.com/FabianHenneke/WearAuthn/issues/new?assignees=FabianHenneke&amp;template=bug_report.md</string>
<string name="label_purchase_button_purchased">Purchased</string>
<string name="label_purchase_button_pending">Purchase pending</string>
Expand Down

0 comments on commit 8b1c48a

Please sign in to comment.