Skip to content

Commit

Permalink
Used dated version codes for sample (#2243)
Browse files Browse the repository at this point in the history
* Used dated version codes

* Update build.gradle.kts
  • Loading branch information
yschimke authored May 29, 2024
1 parent 1755bbc commit ab0e3c5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

import java.time.LocalDate
import java.time.format.DateTimeFormatter.ofPattern
import java.util.Locale

plugins {
id("com.android.application")
kotlin("android")
Expand All @@ -29,8 +33,10 @@ android {
minSdk = 26
targetSdk = 34

versionCode = 1
versionName = "1.0"
val date = LocalDate.now()

versionCode = date.format(ofPattern("yyyyMMdd", Locale.ROOT)).toInt()
versionName = date.toString()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down

0 comments on commit ab0e3c5

Please sign in to comment.