@@ -32,40 +32,57 @@ Without take care to VersionCode is necessary when you auto generate the Version
3232language-specific versions of ` res/xml/ ` , e.g. ` res/xml-de/changelog.xml ` .
3333
3434## Usage git changelog
35- To generate a git changelog, grouped by tag you can run
35+ To generate a git changelog, grouped by tag you can run ` getTagGroupedGitlog ` e.g
36+
37+ ``` kts
38+ afterEvaluate {
39+ tasks.named(" generateReleaseResources" ) {
40+ doLast {
41+ getTagGroupedGitlog(
42+ verbose = true ,
43+ filter = " RELEASE" , // optional, only include tags with "RELEASE" in their name
44+ filename = " app/src/main/res/raw/gitlog.json"
45+ )
46+ }
47+ }
48+ }
49+ ```
3650
37- ` ./generateTagGroupedGitlog.sh > app/src/main/res/raw/gitlog.json `
51+ or by shell script
52+
53+ ``` #!/bin/bash
54+ ./generateTagGroupedGitlog.sh > app/src/main/res/raw/gitlog.json
55+ ```
3856
3957This will show it similar to the XML
4058
4159## Common usage
4260
43611 . Display the change log dialog by putting the following code in your activity's ` onCreate() ` method:
4462
45- ``` java
46- ChangeLog changelog = new ChangeLog (this );
63+ ``` kt
64+ val changelog = ChangeLog (this )
4765 if (changelog.isFirstRun()) {
48- changelog. getLogDialog(). show();
66+ changelog.getLogDialog().show()
4967 }
5068 ```
5169
5270## Include the library
5371
5472The easiest way to add ChangeLog to your project is via Gradle. Just add the following lines to your ` build.gradle ` :
5573
56- ``` groovy
74+ ``` kts
5775dependencies {
58- implementation ' com.github.AppDevNext:ChangeLog:$latestVersion'
76+ implementation( " com.github.AppDevNext:ChangeLog:$latestVersion " )
5977}
6078```
6179
6280To tell Gradle where to find the library, make sure ` build.gradle ` also contains this:
6381
64- ``` groovy
82+ ``` kts
6583allprojects {
6684 repositories {
67- ...
68- maven { url 'https://jitpack.io' }
85+ maven { url = uri(" https://jitpack.io" ) }
6986 }
7087}
7188```
@@ -83,7 +100,7 @@ In order to change the labels of the dialog add the following items to your `str
83100
84101## License
85102
86- Copyright (C) 2012-2023 AppDevNext and contributors
103+ Copyright (C) 2012-2025 AppDevNext and contributors
87104
88105 Licensed under the Apache License, Version 2.0 (the "License");
89106 you may not use this file except in compliance with the License.
0 commit comments