-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
108 changed files
with
2,945 additions
and
34 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# More details are here: https://help.github.com/articles/about-codeowners/ | ||
|
||
# The '*' pattern is global owners. | ||
# Not adding in this PR, but I'd like to try adding a global owner set with the entire team. | ||
# One interpretation of their docs is that global owners are added only if not removed | ||
# by a more local rule. | ||
|
||
# Order is important. The last matching pattern has the most precedence. | ||
# The folders are ordered as follows: | ||
|
||
# In each subsection folders are ordered first by depth, then alphabetically. | ||
# This should make it easy to add new rules without breaking existing ones. | ||
* @skydoves |
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,2 @@ | ||
github: skydoves | ||
custom: ["https://www.paypal.me/skydoves", "https://www.buymeacoffee.com/skydoves"] |
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: Bug report | ||
about: Something is crashing or not working as intended | ||
|
||
--- | ||
|
||
**Please complete the following information:** | ||
- Library Version [e.g. v1.0.0] | ||
- Affected Device(s) [e.g. Samsung Galaxy s10 with Android 9.0] | ||
|
||
**Describe the Bug:** | ||
|
||
Add a clear description about the problem. | ||
|
||
**Expected Behavior:** | ||
|
||
A clear description of what you expected to happen. |
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: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem?** | ||
|
||
A clear and concise description of what the problem is. | ||
|
||
**Describe the solution you'd like:** | ||
|
||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered:** | ||
|
||
A clear description of any alternative solutions you've considered. |
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 @@ | ||
## Guidelines | ||
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. | ||
|
||
### Types of changes | ||
What types of changes does your code introduce? | ||
|
||
- [ ] Bugfix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
### Preparing a pull request for review | ||
Ensure your change is properly formatted by running: | ||
|
||
```gradle | ||
$ ./gradlew spotlessApply | ||
``` | ||
|
||
Please correct any failures before requesting a review. |
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 @@ | ||
/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,77 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-kapt' | ||
apply from: '../dependencies.gradle' | ||
|
||
android { | ||
compileSdkVersion versions.compileSdk | ||
defaultConfig { | ||
applicationId "com.skydoves.disneymotions" | ||
minSdkVersion versions.minSdk | ||
targetSdkVersion versions.compileSdk | ||
versionCode versions.versionCode | ||
versionName versions.versionName | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
dataBinding { | ||
enabled = true | ||
} | ||
androidExtensions { | ||
experimental = true | ||
} | ||
} | ||
|
||
dependencies { | ||
// kotlin | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin" | ||
|
||
// android supports | ||
implementation "com.google.android.material:material:$versions.materialVersion" | ||
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintVersion" | ||
|
||
// architecture components | ||
implementation "androidx.lifecycle:lifecycle-extensions:$versions.lifecycleVersion" | ||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycleVersion" | ||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycleVersion" | ||
implementation "androidx.room:room-runtime:$versions.roomVersion" | ||
kapt "androidx.room:room-compiler:$versions.roomVersion" | ||
testImplementation "androidx.arch.core:core-testing:$versions.archCompomentVersion" | ||
|
||
// koin | ||
implementation "org.koin:koin-android:$versions.koinVersion" | ||
implementation "org.koin:koin-android-scope:$versions.koinVersion" | ||
implementation "org.koin:koin-android-viewmodel:$versions.koinVersion" | ||
|
||
// network | ||
implementation "com.squareup.retrofit2:retrofit:$versions.retrofitVersion" | ||
implementation "com.squareup.okhttp3:logging-interceptor:$versions.okhttpVersion" | ||
implementation "com.squareup.retrofit2:converter-gson:$versions.retrofitVersion" | ||
|
||
// coroutines | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutinesVersion" | ||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutinesVersion" | ||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$versions.coroutinesVersion" | ||
|
||
// glide | ||
implementation "com.github.bumptech.glide:glide:$versions.glideVersion" | ||
implementation "com.github.florent37:glidepalette:$versions.glidePaletteVersion" | ||
kapt "com.github.bumptech.glide:compiler:$versions.glideVersion" | ||
|
||
// adapter | ||
implementation "com.github.skydoves:baserecyclerviewadapter:$versions.baseAdapter" | ||
|
||
// whatIf | ||
implementation "com.github.skydoves:whatif:$versions.whatIfVersion" | ||
|
||
// debugging | ||
implementation "com.jakewharton.timber:timber:$versions.timberVersion" | ||
} | ||
|
||
apply from: '../spotless.gradle' |
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.skydoves.disneymotions"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:name=".DisneyApplication" | ||
android:allowBackup="false" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme" | ||
tools:ignore="AllowBackup,GoogleAppIndexingWarning"> | ||
<activity | ||
android:name=".view.ui.details.PosterDetailActivity" | ||
android:launchMode="singleTop" /> | ||
<activity android:name=".view.ui.main.MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
50 changes: 50 additions & 0 deletions
50
app/src/main/java/com/skydoves/disneymotions/DisneyApplication.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,50 @@ | ||
/* | ||
* Designed and developed by 2020 skydoves (Jaewoong Eum) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
@file:Suppress("unused") | ||
|
||
package com.skydoves.disneymotions | ||
|
||
import android.app.Application | ||
import com.bumptech.glide.request.target.ViewTarget | ||
import com.skydoves.disneymotions.di.networkModule | ||
import com.skydoves.disneymotions.di.persistenceModule | ||
import com.skydoves.disneymotions.di.repositoryModule | ||
import com.skydoves.disneymotions.di.viewModelModule | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.core.context.startKoin | ||
import timber.log.Timber | ||
|
||
class DisneyApplication : Application() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
|
||
ViewTarget.setTagId(R.string.app_name) | ||
|
||
startKoin { | ||
androidContext(this@DisneyApplication) | ||
modules(networkModule) | ||
modules(persistenceModule) | ||
modules(repositoryModule) | ||
modules(viewModelModule) | ||
} | ||
|
||
if (BuildConfig.DEBUG) { | ||
Timber.plant(Timber.DebugTree()) | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/skydoves/disneymotions/base/DatabindingActivity.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,35 @@ | ||
/* | ||
* Designed and developed by 2020 skydoves (Jaewoong Eum) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.skydoves.disneymotions.base | ||
|
||
import androidx.annotation.LayoutRes | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.databinding.DataBindingUtil | ||
import androidx.databinding.ViewDataBinding | ||
|
||
/** | ||
* DatabindingActivity is an abstract class for providing [DataBindingUtil]. | ||
* provides implementations of only [ViewDataBinding] from an abstract information. | ||
* Do not modify this class. This is a first-level abstraction class. | ||
* If you want to add more specifications, make another class which extends [DatabindingActivity]. | ||
*/ | ||
abstract class DatabindingActivity : AppCompatActivity() { | ||
|
||
protected inline fun <reified T : ViewDataBinding> binding( | ||
@LayoutRes resId: Int | ||
): Lazy<T> = lazy { DataBindingUtil.setContentView<T>(this, resId) } | ||
} |
39 changes: 39 additions & 0 deletions
39
app/src/main/java/com/skydoves/disneymotions/base/DatabindingFragment.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,39 @@ | ||
/* | ||
* Designed and developed by 2020 skydoves (Jaewoong Eum) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.skydoves.disneymotions.base | ||
|
||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import androidx.annotation.LayoutRes | ||
import androidx.databinding.DataBindingUtil | ||
import androidx.databinding.ViewDataBinding | ||
import androidx.fragment.app.Fragment | ||
|
||
/** | ||
* ViewModelFragment is an abstract class for providing [DataBindingUtil]. | ||
* provides implementations of only [ViewDataBinding] from an abstract information. | ||
* Do not modify this class. This is a first-level abstraction class. | ||
* If you want to add more specifications, make another class which extends [DatabindingFragment]. | ||
*/ | ||
abstract class DatabindingFragment : Fragment() { | ||
|
||
protected inline fun <reified T : ViewDataBinding> binding( | ||
inflater: LayoutInflater, | ||
@LayoutRes resId: Int, | ||
container: ViewGroup? | ||
): T = DataBindingUtil.inflate(inflater, resId, container, false) | ||
} |
Oops, something went wrong.