Skip to content

Commit 6029fac

Browse files
author
Melih Aksoy
committed
Initial commit
0 parents  commit 6029fac

File tree

143 files changed

+6891
-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.

143 files changed

+6891
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea
5+
.DS_Store
6+
/build
7+
/captures
8+
.externalNativeBuild
9+
10+
# Project reports
11+
/reports

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Rocket Science

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-kapt'
4+
5+
apply from: "$rootProject.projectDir/scripts/default_android_config.gradle"
6+
apply from: "$rootProject.projectDir/scripts/sources.gradle"
7+
apply from: "$rootProject.projectDir/scripts/flavors.gradle"
8+
9+
android {
10+
defaultConfig {
11+
applicationId "com.melih.rocketscience"
12+
versionCode 1
13+
versionName "1.0"
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
}
16+
17+
dataBinding {
18+
enabled = true
19+
}
20+
}
21+
22+
dependencies {
23+
implementation fileTree(dir: 'libs', include: ['*.jar'])
24+
25+
implementation project(':core')
26+
implementation project(':features:list')
27+
implementation project(':features:detail')
28+
29+
implementation libraries.coroutines
30+
implementation libraries.navigation
31+
32+
debugImplementation libraries.leakCanary
33+
34+
androidTestImplementation testLibraries.espresso
35+
36+
// These libraries required by dagger to create dependency graph, but not by app
37+
compileOnly libraries.retrofit
38+
compileOnly libraries.room
39+
compileOnly libraries.paging
40+
}

app/proguard-rules.pro

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#### OkHttp, Retrofit and Moshi
2+
-dontwarn okhttp3.**
3+
-dontwarn retrofit2.Platform$Java8
4+
-dontwarn okio.**
5+
-dontwarn javax.annotation.**
6+
-keepclasseswithmembers class * {
7+
@retrofit2.http.* <methods>;
8+
}
9+
-keepclasseswithmembers class * {
10+
@com.squareup.moshi.* <methods>;
11+
}
12+
-keep @com.squareup.moshi.JsonQualifier interface *
13+
-dontwarn org.jetbrains.annotations.**
14+
-keep class kotlin.Metadata { *; }
15+
-keepclassmembers class kotlin.Metadata {
16+
public <methods>;
17+
}
18+
19+
-keepclassmembers class * {
20+
@com.squareup.moshi.FromJson <methods>;
21+
@com.squareup.moshi.ToJson <methods>;
22+
}
23+
24+
-keepnames @kotlin.Metadata class com.myapp.packagename.model.**
25+
-keep class com.myapp.packagnename.model.** { *; }
26+
27+
# Keeping entities intact
28+
-keep class com.melih.repository.entities.** { *; }

app/src/main/AndroidManifest.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
package="com.melih.rocketscience">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
7+
<application
8+
android:name=".App"
9+
android:allowBackup="false"
10+
android:hardwareAccelerated="true"
11+
android:icon="@mipmap/ic_launcher"
12+
android:label="@string/app_name"
13+
android:roundIcon="@mipmap/ic_launcher_round"
14+
android:supportsRtl="true"
15+
android:theme="@style/AppTheme"
16+
tools:ignore="GoogleAppIndexingWarning">
17+
18+
<activity
19+
android:name="com.melih.list.ui.LaunchesActivity"
20+
android:theme="@style/AppTheme">
21+
<intent-filter>
22+
<action android:name="android.intent.action.MAIN" />
23+
<category android:name="android.intent.category.LAUNCHER" />
24+
</intent-filter>
25+
</activity>
26+
27+
<activity
28+
android:name="com.melih.detail.ui.DetailActivity"
29+
android:theme="@style/AppTheme">
30+
<intent-filter>
31+
<action android:name="action.dashboard.open" />
32+
<category android:name="android.intent.category.DEFAULT" />
33+
</intent-filter>
34+
</activity>
35+
</application>
36+
</manifest>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.melih.rocketscience
2+
3+
import com.melih.core.di.DaggerCoreComponent
4+
import com.melih.rocketscience.di.DaggerAppComponent
5+
import dagger.android.AndroidInjector
6+
import dagger.android.DaggerApplication
7+
import timber.log.Timber
8+
9+
class App : DaggerApplication() {
10+
override fun applicationInjector(): AndroidInjector<out DaggerApplication> =
11+
DaggerAppComponent.factory()
12+
.create(
13+
DaggerCoreComponent.factory()
14+
.create(this)
15+
)
16+
17+
18+
override fun onCreate() {
19+
super.onCreate()
20+
21+
Timber.plant(Timber.DebugTree())
22+
}
23+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.melih.rocketscience.di
2+
3+
import com.melih.core.di.CoreComponent
4+
import com.melih.rocketscience.App
5+
import dagger.Component
6+
import dagger.android.AndroidInjectionModule
7+
import dagger.android.AndroidInjector
8+
9+
@AppScope
10+
@Component(
11+
modules = [AndroidInjectionModule::class, AppModule::class],
12+
dependencies = [CoreComponent::class]
13+
)
14+
interface AppComponent : AndroidInjector<App> {
15+
16+
@Component.Factory
17+
interface Factory {
18+
fun create(component: CoreComponent): AppComponent
19+
}
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.melih.rocketscience.di
2+
3+
import com.melih.detail.di.DetailContributor
4+
import com.melih.detail.ui.DetailActivity
5+
import com.melih.list.di.LaunchesContributor
6+
import com.melih.list.ui.LaunchesActivity
7+
import dagger.Module
8+
import dagger.android.ContributesAndroidInjector
9+
10+
@Module
11+
abstract class AppModule {
12+
13+
@ContributesAndroidInjector(
14+
modules = [
15+
LaunchesContributor::class
16+
]
17+
)
18+
abstract fun launchesActivity(): LaunchesActivity
19+
20+
@ContributesAndroidInjector(
21+
modules = [
22+
DetailContributor::class
23+
]
24+
)
25+
abstract fun detailActivity(): DetailActivity
26+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.melih.rocketscience.di
2+
3+
import javax.inject.Scope
4+
5+
@Scope
6+
annotation class AppScope
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="108dp"
4+
android:height="108dp"
5+
android:viewportHeight="108"
6+
android:viewportWidth="108">
7+
<path
8+
android:fillType="evenOdd"
9+
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
10+
android:strokeColor="#00000000"
11+
android:strokeWidth="1">
12+
<aapt:attr name="android:fillColor">
13+
<gradient
14+
android:endX="78.5885"
15+
android:endY="90.9159"
16+
android:startX="48.7653"
17+
android:startY="61.0927"
18+
android:type="linear">
19+
<item
20+
android:color="#44000000"
21+
android:offset="0.0"/>
22+
<item
23+
android:color="#00000000"
24+
android:offset="1.0"/>
25+
</gradient>
26+
</aapt:attr>
27+
</path>
28+
<path
29+
android:fillColor="#FFFFFF"
30+
android:fillType="nonZero"
31+
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
32+
android:strokeColor="#00000000"
33+
android:strokeWidth="1"/>
34+
</vector>

0 commit comments

Comments
 (0)