Skip to content

Commit 479dc61

Browse files
committed
Start over with a new repo
0 parents  commit 479dc61

File tree

739 files changed

+59675
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

739 files changed

+59675
-0
lines changed

.gitignore

Lines changed: 702 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# TimeR Machine
2+
3+
A highly customizable interval timer app for Android
4+
5+
![Showcase](images/showcase.jpg)
6+
7+
<a href='https://play.google.com/store/apps/details?id=io.github.deweyreed.timer.google'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' height='100'/></a>
8+
9+
## Structure
10+
11+
The app uses the [Navigation component](https://developer.android.com/guide/navigation).
12+
13+
- Modules whose names start with `app-` are different destinations of the navigation graph.
14+
- Each destination uses `ViewModel` in the `presentation` module.
15+
- Each `ViewModel` is injected with `UseCase` in the `domain` module.
16+
- Each `UseCase` is injected with different repositories that are implemented in the `data` module.
17+
- Modules whose names start with `component-` are shared views and utility codes.
18+
- The `flavor-google` module includes some advanced features and IAP.
19+
20+
## Build
21+
22+
Use the `dog` product flavor to develop. The other two flavors require Firebase. Their detailed
23+
build instructions will arrive later.
24+
25+
## Contribute
26+
27+
Since I've been cleaning up and improving the codebase recently, please open an issue before
28+
contributing. It would avoid some repetitive work.
29+
30+
## License
31+
32+
TimeR Machine is under the [GNU General Public License v3.0](LICENSE).
33+
34+
Some code and functions
35+
from [AOSP's desklock](https://android.googlesource.com/platform/packages/apps/DeskClock/+/refs/heads/master/src/com/android/deskclock)
36+
are under the Apache License 2.0.

app-analytics-fake/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
plugins {
2+
id 'com.android.library'
3+
id 'kotlin-android'
4+
id 'kotlin-kapt'
5+
id 'dagger.hilt.android.plugin'
6+
}
7+
8+
dependencies {
9+
implementation project(':app-base')
10+
11+
implementation libs.hilt_android
12+
kapt libs.hilt_compiler
13+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest package="xyz.aprildown.timer.analytics" />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package xyz.aprildown.timer.analytics
2+
3+
import dagger.Binds
4+
import dagger.Module
5+
import dagger.hilt.InstallIn
6+
import dagger.hilt.components.SingletonComponent
7+
import xyz.aprildown.timer.domain.utils.AppTracker
8+
9+
@Module
10+
@InstallIn(SingletonComponent::class)
11+
internal abstract class AnalyticsModule {
12+
@Binds
13+
abstract fun bindAppTracker(impl: AppTrackerImpl): AppTracker
14+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package xyz.aprildown.timer.analytics
2+
3+
import android.content.Context
4+
import dagger.Reusable
5+
import timber.log.Timber
6+
import xyz.aprildown.timer.domain.utils.AppTracker
7+
import javax.inject.Inject
8+
9+
@Reusable
10+
internal class AppTrackerImpl @Inject constructor() : AppTracker {
11+
override fun init(context: Context) = Unit
12+
13+
override fun trackEvent(event: String, property: String?, value: String?) {
14+
Timber.tag("AnalyticsEvents").i("$event -> $property: $value")
15+
}
16+
17+
override fun trackError(throwable: Throwable, message: String?) {
18+
if (message != null) {
19+
Timber.e(throwable, message)
20+
} else {
21+
Timber.e(throwable)
22+
}
23+
}
24+
25+
override suspend fun hasCrashedInLastSession(): Boolean {
26+
return false
27+
}
28+
}

app-analytics/build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
plugins {
2+
id 'com.android.library'
3+
id 'kotlin-android'
4+
id 'kotlin-kapt'
5+
id 'dagger.hilt.android.plugin'
6+
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
7+
}
8+
9+
secrets {
10+
defaultPropertiesFileName = 'secrets.defaults.properties'
11+
}
12+
13+
dependencies {
14+
implementation project(':app-base')
15+
16+
implementation libs.hilt_android
17+
kapt libs.hilt_compiler
18+
19+
implementation platform(libs.firebase_bom)
20+
implementation libs.firebase_analytics
21+
22+
implementation libs.appcenter_crashes
23+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="xyz.aprildown.timer.analytics">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
7+
<application>
8+
<meta-data
9+
android:name="firebase_analytics_collection_enabled"
10+
android:value="false" />
11+
</application>
12+
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package xyz.aprildown.timer.app.analytics
2+
3+
import dagger.Binds
4+
import dagger.Module
5+
import dagger.hilt.InstallIn
6+
import dagger.hilt.components.SingletonComponent
7+
import xyz.aprildown.timer.domain.utils.AppTracker
8+
9+
@Module
10+
@InstallIn(SingletonComponent::class)
11+
internal abstract class AnalyticsModule {
12+
@Binds
13+
abstract fun bindAppTracker(impl: AppTrackerImpl): AppTracker
14+
}

0 commit comments

Comments
 (0)