-
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.
Merge pull request #34 from Omega-R/develop
Develop
- Loading branch information
Showing
110 changed files
with
2,225 additions
and
766 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ | |
/build | ||
/captures | ||
.externalNativeBuild | ||
lib/build/generated | ||
lib/build |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apply plugin: 'kotlin' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
group = 'com.github.Omega-R.OmegaBase' | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
//noinspection DifferentStdlibGradleVersion | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | ||
} |
5 changes: 5 additions & 0 deletions
5
annotations/src/main/java/com/omega_r/base/annotations/AppOmegaRepository.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,5 @@ | ||
package com.omega_r.base.annotations | ||
|
||
@Retention(AnnotationRetention.SOURCE) | ||
@Target(allowedTargets = [AnnotationTarget.CLASS]) | ||
annotation class AppOmegaRepository |
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
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/omega_r/base/simple/InspectionRepository.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 @@ | ||
package com.omega_r.base.simple | ||
|
||
import com.omega_r.base.annotations.AppOmegaRepository | ||
import com.omega_r.base.data.OmegaRepository.Strategy | ||
import kotlinx.coroutines.channels.ReceiveChannel | ||
|
||
@AppOmegaRepository | ||
interface InspectionRepository : ParentRepository { | ||
|
||
val isAuth: Boolean? | ||
get() = true | ||
var age: Int | ||
|
||
val inspectionUpdateChannel: ReceiveChannel<List<String>> | ||
|
||
suspend fun getInspectionsChannel(strategy: Strategy, index: Int): ReceiveChannel<String> | ||
|
||
suspend fun getInspections(strategy: Strategy, index: Int): String | ||
|
||
suspend fun getInspections(pair: Pair<String, Int>, second: Boolean) | ||
|
||
suspend fun pair(): Pair<String?, Int>? | ||
|
||
suspend fun returnInt(): Int? | ||
|
||
suspend fun returnBoolean(): Boolean { | ||
return true | ||
} | ||
|
||
fun clearCache() | ||
|
||
// TODO future code generation | ||
// suspend fun lambda(func: (String) -> Boolean): Int | ||
|
||
} |
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
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/omega_r/base/simple/ParentRepository.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,7 @@ | ||
package com.omega_r.base.simple | ||
|
||
interface ParentRepository { | ||
|
||
suspend fun parentMethod(): String | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/omega_r/base/simple/dialog_fragment/DialogDialogFragment.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,31 @@ | ||
package com.omega_r.base.simple.dialog_fragment | ||
|
||
import android.os.Bundle | ||
import com.omega_r.base.annotations.OmegaContentView | ||
import com.omega_r.base.components.OmegaDialogFragment | ||
import com.omega_r.base.simple.R | ||
import com.omega_r.libs.omegatypes.Text | ||
import com.omegar.libs.omegalaunchers.createDialogFragmentLauncher | ||
import com.omegar.mvp.presenter.InjectPresenter | ||
|
||
/** | ||
* Created by Anton Knyazev on 10.03.2020. | ||
*/ | ||
@OmegaContentView(R.layout.activity_main) | ||
class DialogDialogFragment : OmegaDialogFragment(), DialogView { | ||
|
||
companion object { | ||
fun createLauncher() = createDialogFragmentLauncher() | ||
} | ||
|
||
@InjectPresenter | ||
override lateinit var presenter: DialogPresenter | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setOnClickListener(R.id.button) { | ||
showToast(Text.from("Test from dialog")) | ||
} | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/omega_r/base/simple/dialog_fragment/DialogPresenter.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,12 @@ | ||
package com.omega_r.base.simple.dialog_fragment | ||
|
||
import com.omega_r.base.mvp.presenters.OmegaPresenter | ||
import com.omegar.mvp.InjectViewState | ||
|
||
/** | ||
* Created by Anton Knyazev on 10.03.2020. | ||
*/ | ||
@InjectViewState | ||
class DialogPresenter : OmegaPresenter<DialogView>() { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/omega_r/base/simple/dialog_fragment/DialogView.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,8 @@ | ||
package com.omega_r.base.simple.dialog_fragment | ||
|
||
import com.omega_r.base.mvp.views.OmegaView | ||
|
||
/** | ||
* Created by Anton Knyazev on 10.03.2020. | ||
*/ | ||
interface DialogView: OmegaView |
Oops, something went wrong.