Skip to content

Commit 5967f57

Browse files
committed
πŸ†™ update deps and prepare for next release
1 parent da70919 commit 5967f57

12 files changed

Lines changed: 75 additions & 100 deletions

File tree

β€Žbuild.gradle.ktsβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
33
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
44

55
plugins {
6-
val kotlinVersion = "1.6.10"
6+
val kotlinVersion = "1.7.0"
77
kotlin("jvm") version kotlinVersion
88
kotlin("kapt") version kotlinVersion
9-
id("org.jetbrains.compose") version "1.0.1"
9+
id("org.jetbrains.compose") version "1.2.0-alpha01-dev741"
1010
}
1111

12-
val daggerVersion by extra("2.40.5")
13-
val stackzyVersion by extra("1.2.4") // TODO : Change in App.kt also
12+
val daggerVersion by extra("2.42")
13+
val stackzyVersion by extra("1.2.5") // TODO : Change in App.kt also
1414

1515
group = "com.theapache64"
1616
version = stackzyVersion

β€Ždata/build.gradle.ktsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = "com.theapache64.stackzy"
7-
version = "1.2.4"
7+
version = "1.2.5"
88

99
repositories {
1010
mavenCentral()
@@ -25,7 +25,7 @@ dependencies {
2525
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.31")
2626

2727
// Retrosheet : Turn Google Spreadsheet to JSON endpoint (for Android and JVM)
28-
api("com.github.theapache64:retrosheet:2.0.0-beta03")
28+
api("com.github.theapache64:retrosheet:2.0.0")
2929

3030
// Retrofit : A type-safe HTTP client for Android and Java.
3131
val retrofitVersion = "2.9.0"

β€Ždata/src/main/kotlin/com/theapache64/stackzy/data/repo/AdbRepo.ktβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import java.net.URL
2626
import java.util.zip.ZipInputStream
2727
import javax.inject.Inject
2828
import javax.inject.Singleton
29-
import kotlin.io.path.ExperimentalPathApi
3029
import kotlin.math.floor
3130
import kotlin.math.roundToInt
3231

@@ -232,7 +231,6 @@ class AdbRepo @Inject constructor(
232231
}
233232
}
234233

235-
@ExperimentalPathApi
236234
@Suppress("BlockingMethodInNonBlockingContext") // suppressing due to invalid IDE warning (bug)
237235
suspend fun downloadAdb() = flow {
238236

β€Žsrc/main/kotlin/com/theapache64/stackzy/App.ktβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fun main() {
3939
// Parsing application arguments
4040
val appArgs = AppArgs(
4141
appName = "Stackzy",
42-
version = "v1.2.4",
42+
version = "v1.2.5",
4343
versionCode = 20220201
4444
)
4545

β€Žsrc/main/kotlin/com/theapache64/stackzy/ui/common/Selectable.ktβ€Ž

Lines changed: 31 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ import androidx.compose.material.MaterialTheme
99
import androidx.compose.material.Text
1010
import androidx.compose.runtime.*
1111
import androidx.compose.ui.Alignment
12+
import androidx.compose.ui.ExperimentalComposeUiApi
1213
import androidx.compose.ui.Modifier
1314
import androidx.compose.ui.draw.clip
1415
import androidx.compose.ui.graphics.Color
15-
import androidx.compose.ui.input.pointer.pointerMoveFilter
16+
import androidx.compose.ui.input.pointer.PointerEventType
17+
import androidx.compose.ui.input.pointer.onPointerEvent
1618
import androidx.compose.ui.layout.ContentScale
1719
import androidx.compose.ui.text.style.TextOverflow
1820
import androidx.compose.ui.unit.Dp
@@ -32,6 +34,7 @@ import kotlin.system.exitProcess
3234
/**
3335
* Once this applied, when you hover the mouse over the item, it's background color will be changed.
3436
*/
37+
@OptIn(ExperimentalComposeUiApi::class)
3538
@Composable
3639
fun Modifier.addHoverEffect(
3740
onClicked: () -> Unit,
@@ -47,43 +50,30 @@ fun Modifier.addHoverEffect(
4750
normalAlpha
4851
}
4952

50-
return this
51-
.background(normalColor.copy(alpha = backgroundAlpha), RoundedCornerShape(cornerRadius))
52-
.clickable {
53+
return this.background(normalColor.copy(alpha = backgroundAlpha), RoundedCornerShape(cornerRadius)).clickable {
5354
onClicked()
54-
}
55-
.pointerMoveFilter(
56-
onEnter = {
57-
isHovered = true
58-
false
59-
},
60-
onExit = {
61-
isHovered = false
62-
false
63-
}
64-
)
55+
}.onPointerEvent(eventType = PointerEventType.Enter, onEvent = {
56+
isHovered = true
57+
}).onPointerEvent(eventType = PointerEventType.Exit, onEvent = {
58+
isHovered = false
59+
})
6560
}
6661

6762
// Preview
6863
fun main() = application {
6964

70-
Window(
71-
onCloseRequest = {
72-
exitProcess(0)
73-
}
74-
) {
65+
Window(onCloseRequest = {
66+
exitProcess(0)
67+
}) {
7568
StackzyTheme {
76-
Selectable(
77-
data = object : AlphabetCircle() {
78-
override fun getTitle() = "WhatsApp"
79-
override fun getSubtitle() = "v1.0.0"
80-
override fun imageUrl() =
81-
"https://play-lh.googleusercontent.com/X64En0aW6jkvDnd5kr16u-YuUsoJ1W2cBzJab3CQ5lObLeQ3T61DpB7AwIoZ7uqgCn4"
82-
},
83-
onSelected = {
84-
85-
}
86-
)
69+
Selectable(data = object : AlphabetCircle() {
70+
override fun getTitle() = "WhatsApp"
71+
override fun getSubtitle() = "v1.0.0"
72+
override fun imageUrl() =
73+
"https://play-lh.googleusercontent.com/X64En0aW6jkvDnd5kr16u-YuUsoJ1W2cBzJab3CQ5lObLeQ3T61DpB7AwIoZ7uqgCn4"
74+
}, onSelected = {
75+
76+
})
8777
}
8878
}
8979
}
@@ -98,37 +88,22 @@ fun main(args: Array<String>) = singleWindowApplication {
9888
packageName = "com.something",
9989
replacementPackage = null,
10090
website = ""
101-
),
102-
null
91+
), null
10392
)
104-
Selectable(
105-
data = dummyLib,
106-
onSelected = {
93+
Selectable(data = dummyLib, onSelected = {
10794

108-
}
109-
)
95+
})
11096
}
11197
}
11298

11399
@Composable
114100
fun <T : AlphabetCircle> Selectable(
115-
data: T,
116-
onSelected: (T) -> Unit,
117-
modifier: Modifier = Modifier,
118-
padding: Dp = 10.dp
101+
data: T, onSelected: (T) -> Unit, modifier: Modifier = Modifier, padding: Dp = 10.dp
119102
) {
120103

121-
Row(
122-
modifier = modifier
123-
.fillMaxWidth()
124-
.addHoverEffect(
125-
onClicked = {
126-
onSelected(data)
127-
}
128-
)
129-
.padding(padding),
130-
verticalAlignment = Alignment.CenterVertically
131-
) {
104+
Row(modifier = modifier.fillMaxWidth().addHoverEffect(onClicked = {
105+
onSelected(data)
106+
}).padding(padding), verticalAlignment = Alignment.CenterVertically) {
132107

133108
if (data.imageUrl() == null) {
134109
// Show only alphabet
@@ -146,14 +121,9 @@ fun <T : AlphabetCircle> Selectable(
146121
AlphabetCircle(data)
147122
},
148123

149-
modifier = Modifier.size(60.dp)
150-
.clip(CircleShape)
151-
.background(MaterialTheme.colors.primary) // outer blue
152-
.padding(2.dp)
153-
.clip(CircleShape)
154-
.background(MaterialTheme.colors.secondary) // gap
155-
.padding(4.dp)
156-
.clip(CircleShape) // logo
124+
modifier = Modifier.size(60.dp).clip(CircleShape).background(MaterialTheme.colors.primary) // outer blue
125+
.padding(2.dp).clip(CircleShape).background(MaterialTheme.colors.secondary) // gap
126+
.padding(4.dp).clip(CircleShape) // logo
157127
)
158128
}
159129

β€Žsrc/main/kotlin/com/theapache64/stackzy/ui/feature/appdetail/Libraries.ktβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package com.theapache64.stackzy.ui.feature.appdetail
33
import androidx.compose.foundation.layout.Column
44
import androidx.compose.foundation.layout.Spacer
55
import androidx.compose.foundation.layout.height
6-
import androidx.compose.foundation.lazy.GridCells
7-
import androidx.compose.foundation.lazy.LazyVerticalGrid
8-
import androidx.compose.foundation.lazy.items
6+
import androidx.compose.foundation.lazy.grid.GridCells
7+
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
8+
import androidx.compose.foundation.lazy.grid.items
99
import androidx.compose.runtime.Composable
1010
import androidx.compose.ui.Modifier
1111
import androidx.compose.ui.res.painterResource
@@ -45,7 +45,7 @@ fun Libraries(
4545
} else {
4646

4747
LazyVerticalGrid(
48-
cells = GridCells.Fixed(4)
48+
columns = GridCells.Fixed(4)
4949
) {
5050
items(
5151
items = report.libraryWrappers

β€Žsrc/main/kotlin/com/theapache64/stackzy/ui/feature/applist/AppListScreen.ktβ€Ž

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package com.theapache64.stackzy.ui.feature.applist
22

33
import androidx.compose.foundation.layout.*
4-
import androidx.compose.foundation.lazy.GridCells
5-
import androidx.compose.foundation.lazy.LazyVerticalGrid
4+
import androidx.compose.foundation.lazy.grid.GridCells
5+
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
6+
import androidx.compose.foundation.lazy.grid.items
67
import androidx.compose.foundation.lazy.items
78
import androidx.compose.material.*
89
import androidx.compose.material.icons.Icons
@@ -116,7 +117,7 @@ fun SelectAppScreen(
116117
if (apps.isNotEmpty()) {
117118
// Grid
118119
LazyVerticalGrid(
119-
cells = GridCells.Fixed(3),
120+
columns = GridCells.Fixed(3),
120121
) {
121122
items(items = apps) { app ->
122123
Column {

β€Žsrc/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailScreen.ktβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.theapache64.stackzy.ui.feature.libdetail
22

33
import androidx.compose.foundation.layout.*
4-
import androidx.compose.foundation.lazy.GridCells
5-
import androidx.compose.foundation.lazy.LazyVerticalGrid
6-
import androidx.compose.foundation.lazy.items
4+
import androidx.compose.foundation.lazy.grid.GridCells
5+
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
6+
import androidx.compose.foundation.lazy.grid.items
77
import androidx.compose.runtime.Composable
88
import androidx.compose.runtime.collectAsState
99
import androidx.compose.runtime.getValue
@@ -52,7 +52,7 @@ fun LibraryDetailScreen(
5252

5353
if (libraries.isNotEmpty()) {
5454
LazyVerticalGrid(
55-
cells = GridCells.Fixed(4)
55+
columns = GridCells.Fixed(4)
5656
) {
5757
items(libraries) { library ->
5858
Column {

β€Žsrc/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListScreen.ktβ€Ž

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package com.theapache64.stackzy.ui.feature.liblist
22

33
import androidx.compose.foundation.layout.*
4-
import androidx.compose.foundation.lazy.GridCells
5-
import androidx.compose.foundation.lazy.LazyVerticalGrid
4+
import androidx.compose.foundation.lazy.grid.GridCells
5+
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
6+
import androidx.compose.foundation.lazy.grid.items
67
import androidx.compose.foundation.lazy.items
78
import androidx.compose.material.Icon
89
import androidx.compose.material.OutlinedTextField
@@ -87,7 +88,7 @@ fun LibraryListScreen(
8788

8889
if (libraries.isNotEmpty()) {
8990
LazyVerticalGrid(
90-
cells = GridCells.Fixed(4)
91+
columns = GridCells.Fixed(4)
9192
) {
9293
items(libraries) { library ->
9394
Column {

β€Žsrc/main/kotlin/com/theapache64/stackzy/ui/feature/login/LogInScreen.ktβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import androidx.compose.material.icons.outlined.Password
1111
import androidx.compose.material.icons.outlined.Visibility
1212
import androidx.compose.runtime.*
1313
import androidx.compose.ui.Alignment
14+
import androidx.compose.ui.ExperimentalComposeUiApi
1415
import androidx.compose.ui.Modifier
1516
import androidx.compose.ui.focus.FocusRequester
1617
import androidx.compose.ui.focus.focusOrder
@@ -91,6 +92,8 @@ fun LogInScreen(
9192
}
9293
}
9394

95+
96+
@OptIn(ExperimentalComposeUiApi::class)
9497
@Composable
9598
private fun Form(
9699
username: String,

0 commit comments

Comments
Β (0)