-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
661d0a9
commit e03de99
Showing
13 changed files
with
101 additions
and
9 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
18 changes: 18 additions & 0 deletions
18
app/src/main/kotlin/id/shaderboi/koffie/KoffieApplication.kt
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,18 @@ | ||
package id.shaderboi.koffie | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
import id.shaderboi.koffie.util.logger.ReleaseTree | ||
import timber.log.Timber | ||
|
||
@HiltAndroidApp | ||
class KoffieApplication : Application() { | ||
override fun onCreate() { | ||
super.onCreate() | ||
if (BuildConfig.DEBUG) { | ||
Timber.plant(Timber.DebugTree()) | ||
} else { | ||
Timber.plant(ReleaseTree()) | ||
} | ||
} | ||
} |
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,16 @@ | ||
package id.shaderboi.koffie.di | ||
|
||
import com.google.firebase.auth.FirebaseAuth | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object AppModule { | ||
@Provides | ||
@Singleton | ||
fun provideFirebaseAuth(): FirebaseAuth = FirebaseAuth.getInstance() | ||
} |
9 changes: 8 additions & 1 deletion
9
app/src/main/kotlin/id/shaderboi/koffie/ui/auth/AuthActivity.kt
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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
package id.shaderboi.koffie.ui.auth | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.core.app.ActivityCompat | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
class AuthActivity: ActivityCompat() { | ||
@AndroidEntryPoint | ||
class AuthActivity: AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
app/src/main/kotlin/id/shaderboi/koffie/ui/auth/SignInFragment.kt
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package id.shaderboi.koffie.ui.auth | ||
|
||
import androidx.fragment.app.Fragment | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class SignInFragment: Fragment() { | ||
} |
2 changes: 2 additions & 0 deletions
2
app/src/main/kotlin/id/shaderboi/koffie/ui/auth/VerifyPhoneFragment.kt
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package id.shaderboi.koffie.ui.auth | ||
|
||
import androidx.fragment.app.Fragment | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class VerifyPhoneFragment: Fragment() { | ||
} |
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
17 changes: 16 additions & 1 deletion
17
app/src/main/kotlin/id/shaderboi/koffie/ui/main/MainActivity.kt
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
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
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
5 changes: 4 additions & 1 deletion
5
app/src/main/kotlin/id/shaderboi/koffie/ui/product/ProductActivity.kt
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package id.shaderboi.koffie.ui.product | ||
|
||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.core.app.ActivityCompat | ||
import androidx.fragment.app.Fragment | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
class ProductActivity: ActivityCompat() { | ||
@AndroidEntryPoint | ||
class ProductActivity: AppCompatActivity() { | ||
} |
16 changes: 16 additions & 0 deletions
16
app/src/main/kotlin/id/shaderboi/koffie/util/logger/ReleaseTree.kt
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,16 @@ | ||
package id.shaderboi.koffie.util.logger | ||
|
||
import android.util.Log | ||
import com.google.firebase.crashlytics.ktx.crashlytics | ||
import com.google.firebase.ktx.Firebase | ||
import timber.log.Timber | ||
|
||
class ReleaseTree: Timber.Tree() { | ||
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) { | ||
if (priority < Log.INFO) { | ||
return | ||
} | ||
|
||
Firebase.crashlytics.log(message) | ||
} | ||
} |
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