Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/Android-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
java_version: [ 17 ]
steps:
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
fetch-tags: true
- name: set up JDK
uses: actions/setup-java@v5
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/Android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
name: Publish release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
fetch-tags: true
- name: Find Tag
id: tagger
uses: jimschubert/query-tag-action@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:

steps:
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
fetch-tags: true
- name: Install JDK
uses: actions/setup-java@v5
with:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#Android generated
bin
gen
build

#Eclipse
.project
.classpath
.settings
.kotlin

#IntelliJ IDEA
.idea/*
Expand All @@ -30,4 +32,5 @@ proguard.cfg

#Gradle
.gradle
build

gitlog.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "buildSrc"]
path = buildSrc
url = git@github.com:hannesa2/KotlinBuildSource.git
2 changes: 1 addition & 1 deletion ChangeLogLib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ afterEvaluate {
}
}
}
}
}
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,40 +32,57 @@ Without take care to VersionCode is necessary when you auto generate the Version
language-specific versions of `res/xml/`, e.g. `res/xml-de/changelog.xml`.

## Usage git changelog
To generate a git changelog, grouped by tag you can run
To generate a git changelog, grouped by tag you can run `getTagGroupedGitlog` e.g

```kts
afterEvaluate {
tasks.named("generateReleaseResources") {
doLast {
getTagGroupedGitlog(
verbose = true,
filter = "RELEASE", // optional, only include tags with "RELEASE" in their name
filename = "app/src/main/res/raw/gitlog.json"
)
}
}
}
```

`./generateTagGroupedGitlog.sh > app/src/main/res/raw/gitlog.json`
or by shell script

```#!/bin/bash
./generateTagGroupedGitlog.sh > app/src/main/res/raw/gitlog.json
```

This will show it similar to the XML

## Common usage

1. Display the change log dialog by putting the following code in your activity's `onCreate()` method:

```java
ChangeLog changelog = new ChangeLog(this);
```kt
val changelog = ChangeLog(this)
if (changelog.isFirstRun()) {
changelog.getLogDialog().show();
changelog.getLogDialog().show()
}
```

## Include the library

The easiest way to add ChangeLog to your project is via Gradle. Just add the following lines to your `build.gradle`:

```groovy
```kts
dependencies {
implementation 'com.github.AppDevNext:ChangeLog:$latestVersion'
implementation("com.github.AppDevNext:ChangeLog:$latestVersion")
}
```

To tell Gradle where to find the library, make sure `build.gradle` also contains this:

```groovy
```kts
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
maven { url = uri("https://jitpack.io") }
}
}
```
Expand All @@ -83,7 +100,7 @@ In order to change the labels of the dialog add the following items to your `str

## License

Copyright (C) 2012-2023 AppDevNext and contributors
Copyright (C) 2012-2025 AppDevNext and contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
20 changes: 20 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import info.git.versionHelper.getTagGroupedGitlog

plugins {
id("com.android.application")
id("kotlin-android")
Expand Down Expand Up @@ -36,3 +38,21 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.2.20")
}

afterEvaluate {
tasks.named("generateReleaseResources") {
doLast {
getTagGroupedGitlog(
filename = "app/src/main/res/raw/gitlog.json"
)
}
}

tasks.named("generateDebugResources") {
doLast {
getTagGroupedGitlog(
verbose = true,
filename = project.projectDir.absolutePath + "/src/main/res/raw/gitlog.json"
)
}
}
}
Loading
Loading