Skip to content

Commit b03bce2

Browse files
author
Pablo Orgaz
committed
Prepare 4.0 release
1 parent 38248cf commit b03bce2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+510
-701
lines changed

app/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ android {
7575
dependencies {
7676
implementation fileTree(dir: 'libs', include: ['*.jar'])
7777

78-
implementation project(":mini-common")
79-
implementation project(":mini-runtime")
78+
implementation project(":mini-android")
8079
kapt project(":mini-processor")
8180

8281
//Misc
@@ -97,7 +96,6 @@ dependencies {
9796
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
9897

9998
testImplementation 'junit:junit:4.12'
100-
androidTestImplementation project(":mini-android-testing")
10199
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
102100
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
103101
androidTestImplementation 'com.agoda.kakao:kakao:1.4.0'

app/src/main/java/org/sample/SampleActivity.kt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package org.sample
22

33
import android.os.Bundle
4-
import androidx.appcompat.app.AppCompatActivity
54
import com.minikorp.grove.ConsoleLogTree
65
import com.minikorp.grove.Grove
7-
import kotlinx.android.synthetic.main.home_activity.*
6+
import com.mini.android.FluxActivity
87
import mini.*
98

10-
class SampleActivity : AppCompatActivity(), SubscriptionTracker by DefaultSubscriptionTracker() {
9+
class SampleActivity : FluxActivity() {
1110

12-
private val dispatcher = Dispatcher()
11+
private val dispatcher = MiniGen.newDispatcher()
1312
private val dummyStore = DummyStore()
1413

1514
override fun onCreate(savedInstanceState: Bundle?) {
@@ -18,24 +17,23 @@ class SampleActivity : AppCompatActivity(), SubscriptionTracker by DefaultSubscr
1817
Grove.plant(ConsoleLogTree())
1918
val stores = listOf(dummyStore)
2019

21-
//MiniGen.initialize(dispatcher, stores)
22-
MiniRuntime.initialize(dispatcher, stores)
20+
MiniGen.register(dispatcher, stores)
2321

2422
dispatcher.addInterceptor(LoggerInterceptor(stores, { tag, msg ->
2523
Grove.tag(tag).d { msg }
2624
}))
2725

28-
dummyStore.flowable().subscribe {
29-
email.text = it.text
30-
}.track()
26+
dummyStore.flow()
27+
.collectOnUi {
28+
it.text
29+
}
3130

3231
dispatcher.dispatch(ActionOne("1"))
3332
dispatcher.dispatch(ActionTwo("2"))
3433
}
3534

3635
override fun onDestroy() {
3736
super.onDestroy()
38-
cancelSubscriptions()
3937
}
4038
}
4139

@@ -52,7 +50,8 @@ data class ActionOne(override val text: String) : ActionInterface, SampleAbstrac
5250
data class DummyState(val text: String = "dummy")
5351
class DummyStore : Store<DummyState>() {
5452

55-
@Reducer fun onInterfaceAction(a: ActionInterface) {
53+
@Reducer
54+
fun onInterfaceAction(a: ActionInterface) {
5655

5756
}
5857

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext {
3-
kotlin_version = '1.3.11'
4-
mini_version = '3.0.0'
3+
kotlin_version = '1.3.41'
4+
mini_version = '4.0.0'
55
}
66

77
repositories {
@@ -11,7 +11,7 @@ buildscript {
1111
}
1212

1313
dependencies {
14-
classpath 'com.android.tools.build:gradle:3.3.2'
14+
classpath 'com.android.tools.build:gradle:3.4.2'
1515
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1616
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
1717
classpath 'com.github.triplet.gradle:play-publisher:1.2.0'
@@ -20,7 +20,7 @@ buildscript {
2020
}
2121

2222
allprojects {
23-
version = 1.1
23+
version = mini_version
2424
group = "com.mini"
2525

2626
repositories {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Jan 24 10:51:50 CET 2019
1+
#Mon Jul 22 11:10:54 CEST 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

mini-android-testing/build.gradle

Lines changed: 0 additions & 25 deletions
This file was deleted.

mini-android-testing/src/main/java/mini/test/CleanStateRule.kt

Lines changed: 0 additions & 27 deletions
This file was deleted.

mini-android-testing/src/main/java/mini/test/TestDispatcherInterceptor.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

mini-android-testing/src/main/java/mini/test/TestDispatcherRule.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.
File renamed without changes.

mini-android/build.gradle

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apply plugin: "com.android.library"
2+
apply plugin: "kotlin-android"
3+
apply plugin: "com.github.dcendents.android-maven"
4+
5+
android {
6+
compileSdkVersion 29
7+
buildToolsVersion "29.0.0"
8+
9+
defaultConfig {
10+
minSdkVersion 14
11+
targetSdkVersion 29
12+
versionCode 1
13+
versionName "1.0"
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
}
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
20+
}
21+
}
22+
}
23+
24+
dependencies {
25+
implementation fileTree(dir: "libs", include: ["*.jar"])
26+
api project(":mini-common")
27+
28+
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.1"
29+
api "androidx.appcompat:appcompat:1.0.2"
30+
api "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha02"
31+
32+
testImplementation "junit:junit:4.12"
33+
androidTestImplementation "androidx.test:runner:1.2.0"
34+
androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0"
35+
}
36+
37+
task sourcesJar(type: Jar) {
38+
classifier = 'sources'
39+
from android.sourceSets.main.java.sourceFiles
40+
}
41+
42+
task javadoc(type: Javadoc) {
43+
source = android.sourceSets.main.java.sourceFiles
44+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
45+
}
46+
47+
task javadocJar(type: Jar, dependsOn: javadoc) {
48+
classifier = 'javadoc'
49+
from javadoc.destinationDir
50+
}
51+
52+
task classesJar(type: Jar) {
53+
from "$buildDir/intermediates/classes/release"
54+
}
55+
56+
artifacts {
57+
archives classesJar
58+
archives javadocJar
59+
archives sourcesJar
60+
}

0 commit comments

Comments
 (0)