-
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
104 changed files
with
1,498 additions
and
748 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
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
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,39 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "1091459842156", | ||
"project_id": "three-days-develop", | ||
"storage_bucket": "three-days-develop.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:1091459842156:android:8f8abdfe99c268fe485849", | ||
"android_client_info": { | ||
"package_name": "com.depromeet.threedays.debug" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "1091459842156-pjhtgjo35d6ro1ra922ngi7aabealvsc.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyB0EiDGdeC8Oxa9HvFshjg0YCZrfhzY4cs" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "1091459842156-pjhtgjo35d6ro1ra922ngi7aabealvsc.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
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,39 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "1091459842156", | ||
"project_id": "three-days-develop", | ||
"storage_bucket": "three-days-develop.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:1091459842156:android:8f8abdfe99c268fe485849", | ||
"android_client_info": { | ||
"package_name": "com.depromeet.threedays.debug" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "1091459842156-pjhtgjo35d6ro1ra922ngi7aabealvsc.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyB0EiDGdeC8Oxa9HvFshjg0YCZrfhzY4cs" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "1091459842156-pjhtgjo35d6ro1ra922ngi7aabealvsc.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
File renamed without changes.
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
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/depromeet/threedays/property/BuildPropertyModule.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,19 @@ | ||
package com.depromeet.threedays.property | ||
|
||
import com.depromeet.threedays.buildproperty.BuildPropertyRepository | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class BuildPropertyModule { | ||
|
||
@Singleton | ||
@Provides | ||
fun bindsBuildPropertyRepositoryProvide( | ||
buildPropertyRepositoryImpl: BuildPropertyRepositoryImpl, | ||
): BuildPropertyRepository = buildPropertyRepositoryImpl | ||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/depromeet/threedays/property/BuildPropertyRepositoryImpl.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,33 @@ | ||
package com.depromeet.threedays.property | ||
|
||
import com.depromeet.threedays.BuildConfig | ||
import com.depromeet.threedays.buildproperty.BuildProperty | ||
import com.depromeet.threedays.buildproperty.BuildPropertyRepository | ||
import timber.log.Timber | ||
import javax.inject.Inject | ||
|
||
class BuildPropertyRepositoryImpl @Inject constructor() : BuildPropertyRepository { | ||
override fun get(buildProperty: BuildProperty): String { | ||
try { | ||
return readProperties(buildProperty = buildProperty) | ||
} catch (e: Exception) { | ||
throw IllegalStateException( | ||
"Failed to read property from local.properties. key: $buildProperty", | ||
e | ||
) | ||
} | ||
} | ||
|
||
override fun getOrNull(buildProperty: BuildProperty): String? { | ||
return try { | ||
readProperties(buildProperty = buildProperty) | ||
} catch (e: Exception) { | ||
Timber.e(e, "Failed to read property from local.properties. key: $buildProperty") | ||
null | ||
} | ||
} | ||
|
||
private fun readProperties(buildProperty: BuildProperty): String { | ||
return BuildConfig::class.java.getDeclaredField(buildProperty.key).get(null) as String | ||
} | ||
} |
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 |
Oops, something went wrong.