This repository was archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
250 changed files
with
10,009 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
custom: | ||
- "https://www.buymeacoffee.com/tydarken" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Bug report about: Create a report to help us improve title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Setup** | ||
|
||
- Android version: [e.g. Android 11] | ||
- App version [e.g. v1.0.0] | ||
- Gear type [e.g. FPV Goggles V1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Run tests | ||
run: ./gradlew testRelease | ||
- name: Build with Gradle | ||
run: ./gradlew assembleDebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Validate Gradle Wrapper" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
validation: | ||
name: "Validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: gradle/wrapper-validation-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
/.idea/**/* | ||
!/.idea/codeStyles/ | ||
!/.idea/codeStyles/**/* | ||
*.jks | ||
.local/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
id 'kotlin-kapt' | ||
id 'kotlin-parcelize' | ||
} | ||
|
||
apply plugin: 'dagger.hilt.android.plugin' | ||
apply plugin: 'androidx.navigation.safeargs.kotlin' | ||
|
||
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim() | ||
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("GMT+1")) | ||
|
||
android { | ||
def packageName = "eu.darken.adsbc" | ||
|
||
compileSdkVersion buildConfig.compileSdk | ||
|
||
Properties bugsnagProps = new Properties() | ||
def bugsnagPropsFile = new File(System.properties['user.home'], ".appconfig/${packageName}/bugsnag.properties") | ||
if (bugsnagPropsFile.canRead()) bugsnagProps.load(new FileInputStream(bugsnagPropsFile)) | ||
|
||
defaultConfig { | ||
applicationId "${packageName}" | ||
|
||
minSdkVersion buildConfig.minSdk | ||
targetSdkVersion buildConfig.targetSdk | ||
|
||
versionCode buildConfig.version.code | ||
versionName buildConfig.version.name | ||
|
||
testInstrumentationRunner "eu.darken.adsbc.HiltTestRunner" | ||
|
||
buildConfigField "String", "GITSHA", "\"${gitSha}\"" | ||
buildConfigField "String", "BUILDTIME", "\"${buildTime}\"" | ||
|
||
manifestPlaceholders = [bugsnagApiKey: "fake"] | ||
} | ||
|
||
signingConfigs { | ||
release {} | ||
} | ||
def signingPropFile = new File(System.properties['user.home'], ".appconfig/${packageName}/signing.properties") | ||
if (signingPropFile.canRead()) { | ||
Properties signingProps = new Properties() | ||
signingProps.load(new FileInputStream(signingPropFile)) | ||
signingConfigs { | ||
release { | ||
storeFile new File(signingProps['release.storePath']) | ||
keyAlias signingProps['release.keyAlias'] | ||
storePassword signingProps['release.storePassword'] | ||
keyPassword signingProps['release.keyPassword'] | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
def proguardRulesRelease = fileTree(dir: "../proguard", include: ["*.pro"]).asList().toArray() | ||
debug { | ||
minifyEnabled false | ||
shrinkResources false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') | ||
proguardFiles proguardRulesRelease | ||
proguardFiles 'proguard-rules-debug.pro' | ||
} | ||
release { | ||
signingConfig signingConfigs.release | ||
lintOptions { | ||
abortOnError true | ||
fatal 'StopShip' | ||
} | ||
minifyEnabled true | ||
shrinkResources true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') | ||
proguardFiles proguardRulesRelease | ||
} | ||
applicationVariants.all { variant -> | ||
if (variant.buildType.name == "debug") { | ||
variant.mergedFlavor.resourceConfigurations.clear() | ||
variant.mergedFlavor.resourceConfigurations.add("en") | ||
variant.mergedFlavor.resourceConfigurations.add("de") | ||
} else if (variant.buildType.name != "debug") { | ||
variant.outputs.each { output -> | ||
output.outputFileName = "${packageName}-v" + defaultConfig.versionName + "(" + defaultConfig.versionCode + ")-" + variant.buildType.name.toUpperCase() + "-" + gitSha + ".apk" | ||
} | ||
} | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
|
||
buildFeatures { | ||
viewBinding true | ||
} | ||
|
||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
|
||
freeCompilerArgs += [ | ||
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", | ||
"-Xuse-experimental=kotlinx.coroutines.FlowPreview", | ||
"-Xuse-experimental=kotlin.time.ExperimentalTime", | ||
"-Xopt-in=kotlin.RequiresOptIn" | ||
] | ||
} | ||
} | ||
|
||
testOptions { | ||
unitTests.all { | ||
useJUnitPlatform() | ||
} | ||
unitTests { | ||
includeAndroidResources = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
test { | ||
java.srcDirs += "$projectDir/src/testShared/java" | ||
} | ||
androidTest { | ||
java.srcDirs += "$projectDir/src/testShared/java" | ||
androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) | ||
} | ||
} | ||
|
||
gradle.projectsEvaluated { | ||
tasks.withType(JavaCompile) { | ||
options.compilerArgs << "-Xmaxerrs" << "1000" // or whatever number you want | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
// Kotlin | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin.core}" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlin.coroutines}" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.kotlin.coroutines}" | ||
|
||
testImplementation "org.jetbrains.kotlin:kotlin-reflect:${versions.kotlin.core}" | ||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${versions.kotlin.coroutines}" | ||
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${versions.kotlin.coroutines}") { | ||
// conflicts with mockito due to direct inclusion of byte buddy | ||
exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug" | ||
} | ||
|
||
implementation("org.jsoup:jsoup:1.14.3") | ||
|
||
// Debugging | ||
implementation ('com.bugsnag:bugsnag-android:5.9.2') | ||
implementation 'com.getkeepsafe.relinker:relinker:1.4.3' | ||
|
||
implementation("com.squareup.moshi:moshi:1.13.0") | ||
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.13.0") | ||
|
||
// DI | ||
implementation "com.google.dagger:dagger:${versions.dagger.core}" | ||
implementation "com.google.dagger:dagger-android:${versions.dagger.core}" | ||
|
||
kapt "com.google.dagger:dagger-compiler:${versions.dagger.core}" | ||
kapt "com.google.dagger:dagger-android-processor:${versions.dagger.core}" | ||
|
||
implementation "com.google.dagger:hilt-android:${versions.dagger.core}" | ||
kapt "com.google.dagger:hilt-android-compiler:${versions.dagger.core}" | ||
|
||
testImplementation "com.google.dagger:hilt-android-testing:${versions.dagger.core}" | ||
kaptTest "com.google.dagger:hilt-android-compiler:${versions.dagger.core}" | ||
|
||
androidTestImplementation "com.google.dagger:hilt-android-testing:${versions.dagger.core}" | ||
kaptAndroidTest "com.google.dagger:hilt-android-compiler:${versions.dagger.core}" | ||
|
||
// Room | ||
implementation "androidx.room:room-runtime:2.4.1" | ||
kapt "androidx.room:room-compiler:2.4.1" | ||
implementation "androidx.room:room-ktx:2.4.1" | ||
|
||
implementation 'com.squareup.retrofit2:retrofit:2.9.0' | ||
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0' | ||
implementation "com.squareup.okhttp3:logging-interceptor:4.9.1" | ||
|
||
// Support libs | ||
implementation 'androidx.core:core-ktx:1.7.0' | ||
implementation 'androidx.appcompat:appcompat:1.4.1' | ||
implementation 'androidx.annotation:annotation:1.3.0' | ||
|
||
implementation 'androidx.activity:activity-ktx:1.4.0' | ||
implementation 'androidx.fragment:fragment-ktx:1.4.1' | ||
|
||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' | ||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' | ||
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.4.0' | ||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.0' | ||
implementation 'androidx.lifecycle:lifecycle-process:2.4.0' | ||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0' | ||
|
||
implementation "androidx.navigation:navigation-fragment-ktx:${versions.androidx.navigation}" | ||
implementation "androidx.navigation:navigation-ui-ktx:${versions.androidx.navigation}" | ||
|
||
implementation 'androidx.preference:preference-ktx:1.2.0' | ||
|
||
implementation 'androidx.core:core-splashscreen:1.0.0-beta01' | ||
|
||
def work_version = "2.7.1" | ||
implementation "androidx.work:work-runtime:${work_version}" | ||
testImplementation "androidx.work:work-testing:${work_version}" | ||
|
||
// UI | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3' | ||
implementation 'com.google.android.material:material:1.6.0-alpha02' | ||
|
||
// Testing | ||
testImplementation 'junit:junit:4.13.2' | ||
testImplementation "org.junit.vintage:junit-vintage-engine:5.7.1" | ||
testImplementation "androidx.test:core-ktx:1.4.0" | ||
|
||
testImplementation "io.mockk:mockk:1.12.1" | ||
androidTestImplementation "io.mockk:mockk-android:1.11.0" | ||
|
||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1" | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1" | ||
testImplementation "org.junit.jupiter:junit-jupiter-params:5.7.1" | ||
|
||
androidTestImplementation "androidx.navigation:navigation-testing:${versions.androidx.navigation}" | ||
|
||
testImplementation "io.kotest:kotest-runner-junit5:4.6.2" | ||
testImplementation "io.kotest:kotest-assertions-core-jvm:4.6.2" | ||
testImplementation "io.kotest:kotest-property-jvm:4.6.2" | ||
androidTestImplementation "io.kotest:kotest-assertions-core-jvm:4.6.2" | ||
androidTestImplementation "io.kotest:kotest-property-jvm:4.6.2" | ||
|
||
testImplementation 'android.arch.core:core-testing:1.1.1' | ||
androidTestImplementation 'android.arch.core:core-testing:1.1.1' | ||
debugImplementation 'androidx.test:core-ktx:1.4.0' | ||
|
||
androidTestImplementation 'androidx.test.ext:junit:1.1.3' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | ||
|
||
androidTestImplementation 'androidx.test:runner:1.4.0' | ||
androidTestImplementation 'androidx.test:rules:1.4.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0' | ||
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.4.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-dontobfuscate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Oops, something went wrong.