-
Notifications
You must be signed in to change notification settings - Fork 7
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
11 changed files
with
111 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
baseUrl=https://bitotsav.in/api/app/ |
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,41 @@ | ||
package `in`.bitotsav.koin | ||
|
||
import `in`.bitotsav.database.AppDatabase | ||
import `in`.bitotsav.events.data.EventRepository | ||
import `in`.bitotsav.feed.data.FeedRepository | ||
import `in`.bitotsav.teams.championship.data.ChampionshipTeamRepository | ||
import `in`.bitotsav.teams.nonchampionship.data.NonChampionshipTeamRepository | ||
import androidx.room.Room | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.dsl.module | ||
|
||
val repositoriesModule = module { | ||
|
||
single { | ||
Room.databaseBuilder(androidContext(), AppDatabase::class.java, "App.db") | ||
.build() | ||
} | ||
factory { EventRepository(get<AppDatabase>().eventDao()) } | ||
factory { FeedRepository(get<AppDatabase>().feedDao()) } | ||
factory { ChampionshipTeamRepository(get<AppDatabase>().championshipTeamDao()) } | ||
factory { NonChampionshipTeamRepository(get<AppDatabase>().nonChampionshipTeamDao()) } | ||
} | ||
|
||
/* | ||
// TODO: Use this! | ||
val retrofitModule = module { | ||
single("custom_gson") { | ||
GsonBuilder().addDeserializationExclusionStrategy(object : ExclusionStrategy { | ||
override fun shouldSkipField(fieldAttributes: FieldAttributes): Boolean { | ||
val expose = fieldAttributes.getAnnotation(Expose::class.java) | ||
return expose != null && !expose.deserialize | ||
} | ||
override fun shouldSkipClass(aClass: Class<*>): Boolean { | ||
return false | ||
} | ||
}).create()//!! <- Is this needed? | ||
} | ||
factory { GsonConverterFactory.create(get<Gson>("custom_gson")) } | ||
}*/ |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Jan 10 20:55:02 IST 2019 | ||
#Sat Jan 26 01:08:47 IST 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1-milestone-1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip |