Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit467dfec

Browse files
committed
Mini 4.0.0
Fix mini-processor-testAdd rules for StateContainer
1 parent82b8f76 commit467dfec

File tree

29 files changed

+224
-91
lines changed

29 files changed

+224
-91
lines changed

‎.idea/kotlinc.xml‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎CHANGELOG.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
###Security
1919
- No security issues fixed!
2020

21+
##[4.0.0] - 2023-10-31
22+
##🎃🎃 Happy Halloween! 🎃🎃
23+
###Changed
24+
- BREAKING CHANGE: Mini has been updated to use Java 17 instead of Java 8.
25+
- BREAKING CHANGE: Mini states must now implement`mini.State`.
26+
- Update all project dependencies.
27+
- Update documentation.
28+
2129
##[3.1.0] - 2022-09-18
2230
###Added
2331
- Add**EXPERIMENTAL** support for Kotlin Symbol Processing (KSP). Be mindful of[the gotchas](README.md#ksp-gotchas).
@@ -174,7 +182,8 @@ state (`success` or `failure`)
174182
###Added
175183
- Initial architecture release.
176184

177-
[Unreleased]:https://github.com/hyperdevs-team/mini-kotlin/compare/3.1.0...HEAD
185+
[Unreleased]:https://github.com/hyperdevs-team/mini-kotlin/compare/4.0.0...HEAD
186+
[4.0.0]:https://github.com/hyperdevs-team/mini-kotlin/compare/3.1.0...4.0.0
178187
[3.1.0]:https://github.com/hyperdevs-team/mini-kotlin/compare/3.0.0...3.1.0
179188
[3.0.0]:https://github.com/hyperdevs-team/mini-kotlin/compare/2.0.0...3.0.0
180189
[2.0.0]:https://github.com/hyperdevs-team/mini-kotlin/compare/1.4.0...2.0.0

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ ksp("com.github.hyperdevs-team.mini-kotlin:mini-processor:${miniVersion}")
147147

148148
</details>
149149

150-
###JDK8 requirements
151-
Ensure that your project has compatibility with Java8:
150+
###JDK
151+
Ensure that your project has compatibility with Java17:
152152

153153
For Kotlin projects:
154154
```groovy
155155
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
156156
kotlinOptions {
157-
jvmTarget = "1.8"
157+
jvmTarget = "17"
158158
}
159159
}
160160
```
@@ -163,12 +163,12 @@ For Android:
163163
```groovy
164164
android {
165165
compileOptions {
166-
sourceCompatibility = JavaVersion.VERSION_1_8
167-
targetCompatibility = JavaVersion.VERSION_1_8
166+
sourceCompatibility = JavaVersion.VERSION_17
167+
targetCompatibility = JavaVersion.VERSION_17
168168
}
169169
170170
kotlinOptions {
171-
jvmTarget = "1.8"
171+
jvmTarget = "17"
172172
}
173173
}
174174
```

‎app/build.gradle‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ apply plugin: "kotlin-kapt"
2828
applyplugin:"com.google.devtools.ksp"
2929

3030
android {
31-
compileSdkVersion android_target_sdk
32-
buildToolsVersion android_build_tools_version
31+
compileSdk= android_target_sdk
32+
buildToolsVersion=android_build_tools_version
3333

3434
namespace"com.example.androidsample"
3535

@@ -55,19 +55,19 @@ android {
5555
}
5656

5757
compileOptions {
58-
sourceCompatibilityJavaVersion.VERSION_1_8
59-
targetCompatibilityJavaVersion.VERSION_1_8
58+
sourceCompatibilityJavaVersion.VERSION_17
59+
targetCompatibilityJavaVersion.VERSION_17
6060
}
6161

6262
kotlinOptions {
63-
jvmTarget="1.8"
63+
jvmTarget="17"
6464
}
6565
lint {
6666
abortOnErrorfalse
6767
}
6868

69-
configurations.all {
70-
//Thisislibrary is included with two different versions
69+
configurations.configureEach {
70+
//This library is included with two different versions
7171
resolutionStrategy.force"com.google.code.findbugs:jsr305:3.0.1"
7272
}
7373
}

‎app/src/main/java/com/example/androidsample/SampleActions.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import mini.Reducer
2121
importmini.SuspendingAction
2222
importjava.io.Serializable
2323

24-
data classState(
24+
data classMainState(
2525
valtext:String ="0",
2626
valloading:Boolean =false
27-
) : Serializable
27+
) : Serializable, mini.State
2828

2929
@Action
3030
data classSetLoadingAction(valloading:Boolean)

‎app/src/main/java/com/example/androidsample/StoreSampleActivity.kt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ import mini.android.FluxActivity
3030

3131
privateval dispatcher=Dispatcher()
3232

33-
classMainStore :Store<State>() {
33+
classMainStore :Store<MainState>() {
3434

3535
init {
3636
Mini.link(dispatcher,this).track()
3737
}
3838

3939
@Reducer
40-
funhandleLoading(state:State,action:SetLoadingAction):State {
40+
funhandleLoading(state:MainState,action:SetLoadingAction):MainState {
4141
return state.copy(loading= action.loading)
4242
}
4343

4444
@Reducer
45-
funhandleSetTextAction(state:State,action:SetTextAction):State {
45+
funhandleSetTextAction(state:MainState,action:SetTextAction):MainState {
4646
return state.copy(text= action.text)
4747
}
4848

‎app/src/main/java/com/example/androidsample/ViewModelSampleActivity.kt‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,33 @@ import mini.android.FluxStoreViewModel
3232

3333
privateval dispatcher=Dispatcher()
3434

35-
classMainViewModelReducer :NestedStateContainer<State>() {
35+
classMainViewModelReducer :NestedStateContainer<MainState>() {
3636

3737
@Reducer
38-
funhandleLoading(state:State,action:SetLoadingAction):State {
38+
funhandleLoading(state:MainState,action:SetLoadingAction):MainState {
3939
return state.copy(loading= action.loading)
4040
}
4141

4242
@Reducer
43-
funhandleSetTextAction(state:State,action:SetTextAction):State {
43+
funhandleSetTextAction(state:MainState,action:SetTextAction):MainState {
4444
return state.copy(text= action.text)
4545
}
4646
}
4747

48-
classMainStoreViewModel(savedStateHandle:SavedStateHandle) : FluxStoreViewModel<State>(savedStateHandle) {
48+
classMainStoreViewModel(savedStateHandle:SavedStateHandle) : FluxStoreViewModel<MainState>(savedStateHandle) {
4949
privateval reducerSlice=MainViewModelReducer().apply { parent=this@MainStoreViewModel }
5050

5151
init {
5252
Mini.link(dispatcher,listOf(this, reducerSlice)).track()
5353
}
5454

55-
overridefunsaveState(state:State,handle:SavedStateHandle) {
55+
overridefunsaveState(state:MainState,handle:SavedStateHandle) {
5656
println("State saved")
5757
handle.set("state", state)
5858
}
5959

60-
overridefunrestoreState(handle:SavedStateHandle):State? {
61-
val restored= handle.get<State>("state")
60+
overridefunrestoreState(handle:SavedStateHandle):MainState? {
61+
val restored= handle.get<MainState>("state")
6262
println("State restored$restored")
6363
return restored
6464
}

‎build.gradle‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ apply plugin: "com.gladed.androidgitversion"
2121

2222
buildscript {
2323
ext {
24-
kotlin_version="1.7.0"
24+
kotlin_version="1.9.10"
2525

26-
android_compile_sdk=33
27-
android_target_sdk=33
28-
android_build_tools_version="30.0.3"
26+
android_compile_sdk=34
27+
android_target_sdk=34
28+
android_build_tools_version="34.0.0"
2929

30-
activity_version="1.5.0"
31-
fragment_version="1.5.0"
32-
lifecycle_version="2.5.1"
33-
coroutines_version="1.6.4"
30+
activity_version="1.8.0"
31+
fragment_version="1.6.1"
32+
lifecycle_version="2.6.2"
33+
coroutines_version="1.7.3"
3434

35-
kodein_version="7.14.0"
35+
kodein_version="7.20.2"
3636

3737
junit_version="4.13.2"
38-
test_runner_version="1.4.0"
39-
espresso_version="3.4.0"
38+
test_runner_version="1.5.2"
39+
espresso_version="3.5.1"
4040
kluent_version="1.68"
4141

42-
ksp_version="${kotlin_version}-1.0.6"
42+
ksp_version="${kotlin_version}-1.0.13"
4343
}
4444

4545
repositories {
@@ -49,11 +49,11 @@ buildscript {
4949
}
5050

5151
dependencies {
52-
classpath"com.android.tools.build:gradle:7.2.2"
52+
classpath"com.android.tools.build:gradle:8.1.2"
5353
classpath"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
5454
classpath"org.junit.platform:junit-platform-gradle-plugin:1.2.0"
5555
classpath"com.gladed.androidgitversion:gradle-android-git-version:0.4.14"
56-
classpath"com.github.ben-manes:gradle-versions-plugin:0.42.0"
56+
classpath"com.github.ben-manes:gradle-versions-plugin:0.48.0"
5757
classpath"com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$ksp_version"
5858
}
5959
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jul 08 11:00:27 CEST 2022
21
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
42
distributionPath=wrapper/dists
5-
zipStorePath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
64
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

‎jitpack.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
jdk:
2-
-openjdk11
2+
-openjdk17

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp