This repository has been archived by the owner on May 17, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert whole project to Kotlin and modernize code.
- Loading branch information
1 parent
c06349f
commit 6a19c07
Showing
92 changed files
with
3,330 additions
and
3,147 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,50 @@ | ||
apply from: '../dependencies.gradle' | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'me.tatarka.retrolambda' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-kapt' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 25 | ||
buildToolsVersion '25.0.3' | ||
compileSdkVersion versions.compileSdk | ||
buildToolsVersion versions.buildTools | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
defaultConfig { | ||
applicationId "com.afollestad.photoaffix" | ||
minSdkVersion 21 | ||
targetSdkVersion 25 | ||
versionCode 25 | ||
versionName "0.6.2 BETA" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
defaultConfig { | ||
applicationId "com.afollestad.photoaffix" | ||
minSdkVersion versions.minSdk | ||
targetSdkVersion versions.compileSdk | ||
versionCode versions.publishVersionCode | ||
versionName versions.publishVersion | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'com.jakewharton:butterknife:8.6.0' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0' | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:' + versions.kotlin | ||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:' + versions.coroutines | ||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:' + versions.coroutines | ||
|
||
implementation 'androidx.appcompat:appcompat:' + versions.androidx | ||
|
||
compile 'com.android.support:appcompat-v7:25.3.1' | ||
implementation 'com.google.dagger:dagger:' + versions.dagger | ||
kapt 'com.google.dagger:dagger-compiler:' + versions.dagger | ||
|
||
compile 'com.github.bumptech.glide:glide:3.7.0' | ||
compile 'com.github.chrisbanes:PhotoView:1.3.1' | ||
implementation 'com.github.bumptech.glide:glide:' + versions.glide | ||
|
||
implementation 'com.afollestad.material-dialogs:core:' + versions.materialDialogs | ||
implementation 'com.afollestad.material-dialogs:color:' + versions.materialDialogs | ||
implementation 'com.afollestad:drag-select-recyclerview:' + versions.dragSelectRv | ||
implementation 'com.afollestad:assent:' + versions.assent | ||
} | ||
|
||
compile 'com.afollestad.material-dialogs:core:0.9.4.5' | ||
compile 'com.afollestad.material-dialogs:commons:0.9.4.5' | ||
compile 'com.afollestad:inquiry:5.0.0' | ||
compile 'com.afollestad:drag-select-recyclerview:0.3.6' | ||
} | ||
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
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,21 @@ | ||
/* | ||
* Licensed under Apache-2.0 | ||
* | ||
* Designed and developed by Aidan Follestad (@afollestad) | ||
*/ | ||
package com.afollestad.photoaffix | ||
|
||
import android.app.Application | ||
|
||
/** @author Aidan Follestad (afollestad) */ | ||
class App : Application() { | ||
|
||
lateinit var appComponent: AppComponent | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
appComponent = DaggerAppComponent.builder() | ||
.application(this) | ||
.build() | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/afollestad/photoaffix/AppComponent.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,28 @@ | ||
/* | ||
* Licensed under Apache-2.0 | ||
* | ||
* Designed and developed by Aidan Follestad (@afollestad) | ||
*/ | ||
package com.afollestad.photoaffix | ||
|
||
import android.app.Application | ||
import com.afollestad.photoaffix.activities.MainActivity | ||
import dagger.BindsInstance | ||
import dagger.Component | ||
import javax.inject.Singleton | ||
|
||
/** @author Aidan Follestad (afollestad) */ | ||
@Singleton | ||
@Component(modules = [AppModule::class]) | ||
interface AppComponent { | ||
|
||
fun inject(mainActivity: MainActivity) | ||
|
||
@Component.Builder | ||
interface Builder { | ||
|
||
@BindsInstance fun application(application: Application): Builder | ||
|
||
fun build(): AppComponent | ||
} | ||
} |
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,27 @@ | ||
/* | ||
* Licensed under Apache-2.0 | ||
* | ||
* Designed and developed by Aidan Follestad (@afollestad) | ||
*/ | ||
package com.afollestad.photoaffix | ||
|
||
import com.afollestad.photoaffix.data.PhotoLoader | ||
import com.afollestad.photoaffix.data.RealPhotoLoader | ||
import com.afollestad.photoaffix.presenters.AffixPresenter | ||
import com.afollestad.photoaffix.presenters.RealAffixPresenter | ||
import dagger.Binds | ||
import dagger.Module | ||
import javax.inject.Singleton | ||
|
||
/** @author Aidan Follestad (afollestad) */ | ||
@Module | ||
abstract class AppModule { | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun providePhotoLoader(realPhotoLoader: RealPhotoLoader): PhotoLoader | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun provideAffixPresenter(affixer: RealAffixPresenter): AffixPresenter | ||
} |
Oops, something went wrong.