Skip to content

Commit

Permalink
build: move versionName definition to gradle file
Browse files Browse the repository at this point in the history
- Change of location of versionName definition from strings.xml to
  app/build.gradle.kts will facilitate building with systems
  (e.g. F-Droid) for which definition from a string reference is
  problematic.

- Change AboutActivity to fetch versionName for display from
  app/build.gradle.kts rather than from a string reference.

- Change fastlane full_description to improve readability of reference
  to the README.md file.

- update version info
  • Loading branch information
dfyockey committed Oct 15, 2024
1 parent b199258 commit a5980c5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ The format of this changelog is based on [Keep a Changelog](https://keepachangel

This project aims to adhere to [Semantic Versioning](https://server.org).

Regarding project commits as of 2024-08-23, this project aims to adhere to the [Conventional Commits](https://www.conventionalcommits.org) standard. While the standard makes recommendations, it does not limit commit type or scope; consequently, usage in the project's commits are not necessarily so limited.
Regarding project commits: As of 2024-08-23, this project aims to adhere to the [Conventional Commits](https://www.conventionalcommits.org) standard. While the standard makes recommendations, it does not limit commit type or scope; consequently, neither type nor scope is limited to those recommendations in the project commits.

## [1.1.1]

### Changed

* Location of versionName definition from strings.xml to app/build.gradle.kts; this facilitates building with systems (e.g. F-Droid) for which definition from a string reference is problematic.
* AboutActivity to fetch versionName for display from app/build.gradle.kts rather than from a string reference.
* Fastlane full_description to improve readability of reference to the README.md file.

## [1.1.0]

Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId = "net.diffengine.romandigitalclock"
minSdk = 21
targetSdk = 34
versionCode = 2
versionName = "@string/app_version"
versionCode = 3
versionName = "1.1.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -28,6 +28,7 @@ android {
}
buildFeatures {
viewBinding = true
buildConfig = true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ protected void onCreate(Bundle savedInstanceState) {

TextView tv = findViewById(R.id.tvVersion);

tv.setText(getString(R.string.app_version_label, getString(R.string.app_version)));
// BuildConfig full package name is to prevent any possible future confusion with org.acra.BuildConfig
String appversion = net.diffengine.romandigitalclock.BuildConfig.VERSION_NAME;

tv.setText(getString(R.string.app_version_label, appversion));

ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<string name="app_name">RomanDigital</string>
<string name="app_subtitle">A Digital Clock with Roman Numeral Display</string>
<string name="app_version_label">Version %1$s</string>
<string name="app_version">1.1.0</string>

<string name="title_activity_settings">Settings</string>
<string name="title_activity_about">About</string>
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Changed:
* Internal location of versionName definition to facilitate inclusion on F-Droid.
3 changes: 1 addition & 2 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ RomanDigital includes features expected in an ordinary digital clock app, such a
<li>Display in either portrait or landscape</li>
</ul>

For more detailed information, please see:
https://github.com/dfyockey/RomanDigital/blob/main/README.md
For more detailed information, please see the README.md file accompanying the RomanDigital source code.

Source code for RomanDigital is available at:
https://github.com/dfyockey/RomanDigital

0 comments on commit a5980c5

Please sign in to comment.