Compare commits

..
1 Commits
Author SHA1 Message Date
robin e1e7742ecb Merge pull request 'Initial' (#4) from initial into main
Reviewed-on: #4
2026-09-19 17:29:57 +00:00
6 changed files with 22 additions and 96 deletions

No files matched your search

+10 -58
View File
@@ -1,10 +1,9 @@
# .gitea/workflows/build-release.yml
name: Build & Release Android App name: Build & Release Android App
on: on:
push: push:
tags: tags:
- 'v*' - 'v*' # Startet bei Tags wie v1.0.0, v1.0.1 etc.
jobs: jobs:
build: build:
@@ -13,72 +12,25 @@ jobs:
- name: Code auschecken - name: Code auschecken
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Java/JDK 17 einrichten # HIER IST DIE LÖSUNG: Java 25 statt 17 bereitstellen
uses: actions/setup-java@v5 - name: Java/JDK 25 einrichten
uses: actions/setup-java@v4
with: with:
java-version: '17' java-version: '25'
distribution: 'temurin' distribution: 'temurin'
cache: gradle
- name: Rechte für gradlew setzen - name: Gradle einrichten
run: chmod +x gradlew uses: gradle/actions/setup-gradle@v3
- name: Android SDK Pfad prüfen & einrichten
run: |
if [ -d "/usr/local/lib/android/sdk" ]; then
SDK_PATH="/usr/local/lib/android/sdk"
elif [ -d "/opt/android-sdk" ]; then
SDK_PATH="/opt/android-sdk"
else
echo "Android SDK nicht gefunden. Installiere cmdline-tools..."
SDK_PATH="$HOME/android-sdk"
mkdir -p "$SDK_PATH/cmdline-tools"
cd "$SDK_PATH/cmdline-tools"
curl -s -o tools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip -q tools.zip
mv cmdline-tools latest
rm tools.zip
fi
echo "ANDROID_HOME=$SDK_PATH" >> $GITHUB_ENV
echo "ANDROID_SDK_ROOT=$SDK_PATH" >> $GITHUB_ENV
echo "sdk.dir=$SDK_PATH" > local.properties
- name: Android SDK Lizenzen vorab akzeptieren
run: |
LIC_DIR="${ANDROID_HOME:-$HOME/android-sdk}/licenses"
mkdir -p "$LIC_DIR"
echo -e "\n24333f8a637b37ea6d1270c750f0160576065016" > "$LIC_DIR/android-sdk-license"
echo -e "\n84831b9409646a456e88576d19212d3582701724" >> "$LIC_DIR/android-sdk-license"
echo -e "\nd975f751698a7780098d5c6814341db27684b376" > "$LIC_DIR/android-sdk-preview-license"
echo -e "\n33b6a2b64607f11b759f320ef9dff4ae5e40007e" > "$LIC_DIR/android-googletv-license"
echo -e "\n6010077ebe6b4f930974d1266684e201b8723913" > "$LIC_DIR/android-googlexr-license"
- name: Android Release APK bauen - name: Android Release APK bauen
# Keine fehleranfälligen Flags mehr nötig!
run: | run: |
VERSION="${GITHUB_REF_NAME#v}" chmod +x gradlew
./gradlew assembleRelease --no-daemon -PversionNameOverride="$VERSION" ./gradlew assembleRelease
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Release-Notes extrahieren
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk -v v="$VERSION" '
index($0, "## [" v "]") == 1 {found=1; next}
found && /^## \[/ {exit}
found {print}
' CHANGELOG.md > release-notes.md
[ -s release-notes.md ] || echo "Keine Release-Notes vorhanden." > release-notes.md
- name: Release in Gitea erstellen - name: Release in Gitea erstellen
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: app/build/outputs/apk/release/*.apk files: app/build/outputs/apk/release/*.apk
body_path: release-notes.md
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -2
View File
@@ -1,14 +1,13 @@
*.iml *.iml
.gradle .gradle
.idea
/local.properties /local.properties
/.idea
/.idea/caches /.idea/caches
/.idea/libraries /.idea/libraries
/.idea/modules.xml /.idea/modules.xml
/.idea/workspace.xml /.idea/workspace.xml
/.idea/navEditor.xml /.idea/navEditor.xml
/.idea/assetWizardSettings.xml /.idea/assetWizardSettings.xml
/.idea/misc.xml
.DS_Store .DS_Store
/build /build
/captures /captures
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" project-jdk-name="jbr-25" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
-9
View File
@@ -1,9 +0,0 @@
# Changelog
## [1.0.1] - 2026-09-29
### Neu
- Erste stabile Version mit automatischen APK-Builds
- CHANGELOG.md als Release-Body
### Behoben
- VersionCode und -Name
+9 -25
View File
@@ -3,22 +3,6 @@ plugins {
alias(libs.plugins.kotlin.compose) alias(libs.plugins.kotlin.compose)
} }
val tagVersion = (project.findProperty("versionNameOverride") as String?) ?: "0.0.0-dev"
// "1.2.3" oder "1.2.3-alpha9" -> Kern "1.2.3" für den versionCode
val core = tagVersion
.removePrefix("v")
.substringBefore("-")
val parts = core.split(".").map { it.toIntOrNull() ?: 0 }
val major = parts.getOrElse(0) { 0 }
val minor = parts.getOrElse(1) { 0 }
val patch = parts.getOrElse(2) { 0 }
val copyChangelog by tasks.registering(Copy::class) {
from(rootProject.file("CHANGELOG.md"))
into(layout.buildDirectory.dir("generated/changelog"))
}
android { android {
namespace = "de.schanbro.weekfocus" namespace = "de.schanbro.weekfocus"
compileSdk { compileSdk {
@@ -29,8 +13,8 @@ android {
applicationId = "de.schanbro.weekfocus" applicationId = "de.schanbro.weekfocus"
minSdk = 29 minSdk = 29
targetSdk = 37 targetSdk = 37
versionCode = major * 10000 + minor * 100 + patch versionCode = 1
versionName = tagVersion versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
@@ -43,13 +27,16 @@ android {
} }
} }
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_25
} }
buildFeatures { buildFeatures {
compose = true compose = true
} }
sourceSets["main"].assets.srcDir(layout.buildDirectory.dir("generated/changelog")) }
kotlin {
jvmToolchain(25)
} }
dependencies { dependencies {
@@ -68,7 +55,4 @@ dependencies {
androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.junit)
debugImplementation(libs.androidx.compose.ui.test.manifest) debugImplementation(libs.androidx.compose.ui.test.manifest)
debugImplementation(libs.androidx.compose.ui.tooling) debugImplementation(libs.androidx.compose.ui.tooling)
} }
tasks.matching { it.name.startsWith("merge") && it.name.endsWith("Assets") }
.configureEach { dependsOn(copyChangelog) }
+1 -1
View File
@@ -1,5 +1,5 @@
[versions] [versions]
agp = "9.4.1" agp = "9.4.0"
coreKtx = "1.10.1" coreKtx = "1.10.1"
junit = "4.13.2" junit = "4.13.2"
junitVersion = "1.1.5" junitVersion = "1.1.5"