Skip to content
Open
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
37 changes: 37 additions & 0 deletions .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Upload Debug APK

on:
push:
branches:
- main
- beta

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "8.7"

- name: Clean project
run: ./gradlew clean

- name: Build Debug Bundle
run: ./gradlew buildDevDebugPreBundle

- name: Zip APK for Debug
run: ./gradlew zipApkForDebug

- name: Upload APK
uses: actions/upload-artifact@v4
with:
path: app/build/outputs/apk/dev/debug/OGStarTrackerApp-dev-debug.apk
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ app/dev/release/baselineProfiles
app/dev/release
app/ogstartracker.keystore
app/prod.keystore
android
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Clean",
"type": "shell",
"command": "./gradlew clean",
"group": "build",
"problemMatcher": []
},
{
"label": "Build",
"type": "shell",
"command": "./gradlew buildDevDebugPreBundle",
"group": "build",
"dependsOn": "Clean",
"problemMatcher": []
},
{
"label": "Zip APK for Debug",
"type": "shell",
"command": "./gradlew zipApkForDebug",
"group": "build",
"dependsOn": "Build",
"problemMatcher": []
}
]
}
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ The OG Star Tracker app is designed to assist astrophotographers in setting up t
* **Moshi** - parsing json
* **Timber** - logging

## Build setup

To prepare your environment to build the app locally you can use your IDE of choice. This guide walks you through the building of the app with the Visual Studio Code IDE.
Extensions you need:
- [Gradle for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle)
- [Kotlin Language](https://marketplace.visualstudio.com/items?itemName=mathiasfrohlich.Kotlin)

What you need now is the android sdk. For that we are not required to use the android studio at all and only require the cli tools.
- Download the [cli-tools for windows](https://developer.android.com/studio?hl=de#command-line-tools-only)
- Extract them into **android/cmdline-tools/tools**
- Install the dependencies and the sdk with the sdkmanager
```shell
OG-star-tracker-App\android\cmdline-tools\tools\bin> .\sdkmanager.bat "platform-tools"
OG-star-tracker-App\android\cmdline-tools\tools\bin> .\sdkmanager.bat "platforms;android-34"
OG-star-tracker-App\android\cmdline-tools\tools\bin> .\sdkmanager.bat "build-tools;34.0.0"
```
- Configure the **$ANDROID_HOME** variable in your PATH or alternatively set the **sdk.dir=android** in your **local.properties**.
- Now reload the window and and let the gradle extension configure the project.
- Once the **OG Star Tracker** project is configured you can check the **Tasks/other** directive and execute the **zipApksForDevDebug** to finally build the App.


## Contributing to the OG Star Tracker App

We welcome contributions from the community! If you're looking to contribute to the OG Star Tracker app, here's how you can do so:
Expand Down
9 changes: 9 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ android {
buildConfigField("String", "TRACKER_URL", "\"http://www.tracker.com\"")
}
}

applicationVariants.all {
outputs.all {
val outputImpl = this as com.android.build.gradle.internal.api.BaseVariantOutputImpl
val variantName = name
val newApkName = "OGStarTrackerApp-${variantName}.apk"
outputImpl.outputFileName = newApkName
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true

# Disable sdk download
android.builder.sdkDownload=false