Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit b675ee3

Browse files
committed
#294 added developers, fixed composite build name in publish command, removed excess
1 parent a058b1a commit b675ee3

File tree

11 files changed

+63
-38
lines changed

11 files changed

+63
-38
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
java-version: 11
2828
- name: Publish plugin
29-
run: ./gradlew -p widgets-generator publishMavenJavaPublicationToOSSRHRepository
29+
run: ./gradlew -p plugin publishMavenJavaPublicationToOSSRHRepository
3030
- name: Publish library
3131
run: ./gradlew publish
3232

sample/mpp-library/src/commonMain/kotlin/App.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class App() : BaseApplication() {
113113

114114
private fun registerGalleryScreen(
115115
theme: Theme,
116-
router: NavigationScreen.Router,
116+
router: NavigationScreen.Router
117117
): TypedScreenDesc<Args.Empty, SelectGalleryScreen> {
118118
return registerScreen(SelectGalleryScreen::class) {
119119
SelectGalleryScreen(
@@ -137,7 +137,7 @@ class App() : BaseApplication() {
137137

138138
private fun buildInputGalleryRouteInfo(
139139
theme: Theme,
140-
router: NavigationScreen.Router,
140+
router: NavigationScreen.Router
141141
): SelectGalleryScreen.RouteInfo {
142142
val inputScreen = registerScreen(InputWidgetGalleryScreen::class) {
143143
InputWidgetGalleryScreen(
@@ -166,7 +166,7 @@ class App() : BaseApplication() {
166166

167167
private fun buildSearchRouteInfo(
168168
theme: Theme,
169-
router: NavigationScreen.Router,
169+
router: NavigationScreen.Router
170170
): SelectGalleryScreen.RouteInfo {
171171
val searchScreen = registerScreen(ProductsSearchScreen::class) {
172172
ProductsSearchScreen(theme)
@@ -180,7 +180,7 @@ class App() : BaseApplication() {
180180

181181
private fun buildTabsRouteInfo(
182182
theme: Theme,
183-
router: NavigationScreen.Router,
183+
router: NavigationScreen.Router
184184
): SelectGalleryScreen.RouteInfo {
185185
val tabsTheme = Theme(theme) {
186186
TabsSampleScreen.configureDefaultTheme(this)
@@ -197,7 +197,7 @@ class App() : BaseApplication() {
197197

198198
private fun buildCollectionRouteInfo(
199199
theme: Theme,
200-
router: NavigationScreen.Router,
200+
router: NavigationScreen.Router
201201
): SelectGalleryScreen.RouteInfo {
202202
val collectionTheme = Theme(theme) {
203203
factory[CollectionWidget.DefaultCategory] = SimpleCollectionViewFactory(
@@ -222,7 +222,7 @@ class App() : BaseApplication() {
222222
@Suppress("MagicNumber")
223223
private fun buildPostsRouteInfo(
224224
theme: Theme,
225-
router: NavigationScreen.Router,
225+
router: NavigationScreen.Router
226226
): SelectGalleryScreen.RouteInfo {
227227
val postsTheme = Theme(theme) {
228228
factory[PostsScreen.Id.Collection] = SimpleCollectionViewFactory(
@@ -245,7 +245,7 @@ class App() : BaseApplication() {
245245

246246
private fun buildPermissionsRouteInfo(
247247
theme: Theme,
248-
router: NavigationScreen.Router,
248+
router: NavigationScreen.Router
249249
): SelectGalleryScreen.RouteInfo {
250250
val screen = registerScreen(PermissionsScreen::class) {
251251
PermissionsScreen(theme)
@@ -259,7 +259,7 @@ class App() : BaseApplication() {
259259

260260
private fun buildMediaRouteInfo(
261261
theme: Theme,
262-
router: NavigationScreen.Router,
262+
router: NavigationScreen.Router
263263
): SelectGalleryScreen.RouteInfo {
264264
val screen = registerScreen(MediaScreen::class) {
265265
MediaScreen(theme)
@@ -273,7 +273,7 @@ class App() : BaseApplication() {
273273

274274
@Suppress("LongMethod", "MagicNumber")
275275
private fun oldDemo(
276-
router: NavigationScreen.Router,
276+
router: NavigationScreen.Router
277277
): TypedScreenDesc<Args.Empty, LoginScreen> {
278278
val sharedFactory = SharedFactory()
279279
val theme = AppTheme.baseTheme
@@ -441,7 +441,7 @@ class App() : BaseApplication() {
441441
}
442442

443443
class RegisterScreen(
444-
private val theme: Theme,
444+
private val theme: Theme
445445
) : WidgetScreen<Args.Empty>(), Resultable<RegisterScreen.Result>, NavigationItem {
446446
override val navigationBar: NavigationBar = NavigationBar.Normal(title = "Registration".desc())
447447

@@ -466,7 +466,7 @@ class RegisterScreen(
466466

467467
class LogoutScreen(
468468
private val theme: Theme,
469-
private val logoutRoute: Route<Unit>,
469+
private val logoutRoute: Route<Unit>
470470
) : WidgetScreen<Args.Empty>() {
471471
override fun createContentWidget() = with(theme) {
472472
container(size = WidgetSize.AsParent) {
@@ -486,7 +486,7 @@ class LogoutScreen(
486486
@Suppress("MagicNumber")
487487
class MainBottomNavigationScreen(
488488
router: Router,
489-
builder: BottomNavigationItem.Builder.() -> Unit,
489+
builder: BottomNavigationItem.Builder.() -> Unit
490490
) : BottomNavigationScreen(router, builder), NavigationItem {
491491
override val navigationBar: NavigationBar = NavigationBar.None
492492

@@ -509,7 +509,7 @@ class RootNavigationScreen<T>(initialScreen: TypedScreenDesc<Args.Empty, T>, rou
509509

510510
class ProductsNavigationScreen(
511511
initialScreen: TypedScreenDesc<Args.Empty, ProductsScreen>,
512-
router: Router,
512+
router: Router
513513
) : NavigationScreen<ProductsScreen>(initialScreen, router)
514514

515515
class CartNavigationScreen(initialScreen: TypedScreenDesc<Args.Empty, CartScreen>, router: Router) :

sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/sample/McommerceProfileSample.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ interface McommerceProfileViewModelContract {
8484
fun onSavePressed()
8585
}
8686

87-
@Suppress("EmptyDefaultConstructor")
88-
class McommerceProfileViewModel() : ViewModel(), McommerceProfileViewModelContract {
87+
class McommerceProfileViewModel : ViewModel(), McommerceProfileViewModelContract {
8988
override val nameField: FormField<String, StringDesc> = FormField("Aleksey", liveBlock { null })
9089
override val phoneField: FormField<String, StringDesc> =
9190
FormField("+79999999999", liveBlock { null })

sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/sample/UsersSample.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import kotlinx.coroutines.launch
2626

2727
class UsersScreen(
2828
private val theme: Theme,
29-
private val viewModel: UsersViewModelContract,
29+
private val viewModel: UsersViewModelContract
3030
) {
3131
fun createWidget(): Widget<WidgetSize.Const<SizeSpec.AsParent, SizeSpec.AsParent>> {
3232
return with(theme) {
@@ -70,7 +70,7 @@ interface UsersViewModelContract {
7070
}
7171

7272
class UsersViewModel(
73-
private val unitsFactory: UnitsFactory,
73+
private val unitsFactory: UnitsFactory
7474
) : ViewModel(), UsersViewModelContract {
7575
private val _loadNextPage = MutableLiveData(false)
7676
private val _items: MutableLiveData<List<Pair<String, String>>> = MutableLiveData(
@@ -157,22 +157,22 @@ class UsersViewModel(
157157
itemId: Long,
158158
name: String,
159159
avatarUrl: String,
160-
onClick: () -> Unit,
160+
onClick: () -> Unit
161161
): TableUnitItem
162162

163163
fun createUserCollectionUnit(
164164
itemId: Long,
165165
name: String,
166166
avatarUrl: String,
167-
onClick: () -> Unit,
167+
onClick: () -> Unit
168168
): CollectionUnitItem
169169

170170
fun createLoadingTableUnit(
171-
itemId: Long,
171+
itemId: Long
172172
): TableUnitItem
173173

174174
fun createLoadingCollectionUnit(
175-
itemId: Long,
175+
itemId: Long
176176
): CollectionUnitItem
177177
}
178178
}

sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/units/LoadingUnitWidget.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import dev.icerock.moko.widgets.core.units.WidgetsCollectionUnitItem
1616
import dev.icerock.moko.widgets.core.units.WidgetsTableUnitItem
1717

1818
class LoadingUnitWidget(
19-
private val theme: Theme,
19+
private val theme: Theme
2020
) {
2121
@Suppress("MagicNumber")
2222
fun createWidget(data: LiveData<Unit>): Widget<WidgetSize.Const<SizeSpec.AsParent, SizeSpec.Exact>> {
@@ -46,7 +46,7 @@ class LoadingUnitWidget(
4646

4747
class TableUnitItem(
4848
theme: Theme,
49-
itemId: Long,
49+
itemId: Long
5050
) : WidgetsTableUnitItem<Unit>(itemId, Unit) {
5151
private val unitWidget = LoadingUnitWidget(theme)
5252

@@ -59,7 +59,7 @@ class LoadingUnitWidget(
5959

6060
class CollectionUnitItem(
6161
theme: Theme,
62-
itemId: Long,
62+
itemId: Long
6363
) : WidgetsCollectionUnitItem<Unit>(itemId, Unit) {
6464
private val unitWidget = LoadingUnitWidget(theme)
6565

sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/units/PostCollectionUnitItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ class PostCollectionUnitItem(
8181
}
8282
}
8383

84-
@Suppress("CommentSpacing")
8584
private fun Theme.createFooter(
8685
data: LiveData<PostsViewModelContract.PostItem>
8786
): Widget<out WidgetSize> {
87+
@Suppress("CommentSpacing")
8888
val regularItems = listOf<Widget<out WidgetSize>>(
8989
text(
9090
size = WidgetSize.Const(SizeSpec.MatchConstraint, SizeSpec.WrapContent),

sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/universal/LoginScreen.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class LoginScreen(
5959
override val isKeyboardResizeContent: Boolean = true
6060
override val isDismissKeyboardOnTap: Boolean = true
6161

62-
@Suppress("LongMethod", "CommentSpacing")
62+
@Suppress("LongMethod")
6363
override fun createContentWidget() = with(theme) {
6464
val viewModel = getViewModel {
6565
loginViewModelFactory(createEventsDispatcher())
@@ -109,6 +109,7 @@ class LoginScreen(
109109
text = const("IceRock Development")
110110
)
111111

112+
@Suppress("CommentSpacing")
112113
constraints {
113114
passwordInput centerYToCenterY root
114115
passwordInput leftRightToLeftRight root offset 16
@@ -176,7 +177,7 @@ class LoginScreen(
176177
}
177178

178179
class LoginViewModel(
179-
override val eventsDispatcher: EventsDispatcher<EventsListener>,
180+
override val eventsDispatcher: EventsDispatcher<EventsListener>
180181
) : ViewModel(), EventsDispatcherOwner<LoginViewModel.EventsListener> {
181182
val emailField = FormField<String, StringDesc>("", liveBlock { null })
182183
val passwordField = FormField<String, StringDesc>("", liveBlock { "blahbags".desc() })

sample/mpp-library/src/commonMain/kotlin/dev/icerock/moko/widgets/sample/ScrollContentScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import dev.icerock.moko.widgets.core.style.view.SizeSpec
1717
import dev.icerock.moko.widgets.core.style.view.WidgetSize
1818

1919
abstract class ScrollContentScreen<A : Args>(
20-
protected val theme: Theme,
20+
protected val theme: Theme
2121
) : WidgetScreen<A>() {
2222

2323
override fun createContentWidget(): Widget<WidgetSize.Const<SizeSpec.AsParent, SizeSpec.AsParent>> {

widgets-build-logic/src/main/kotlin/publication-convention.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,31 @@ publishing {
3939
name.set("Aleksey Mikhailov")
4040
email.set("aleksey.mikhailov@icerockdev.com")
4141
}
42+
developer {
43+
id.set("ATchernov")
44+
name.set("Andrey Tchernov")
45+
email.set("tchernov@icerockdev.com")
46+
}
47+
developer {
48+
id.set("Dorofeev")
49+
name.set("Andrey Dorofeev")
50+
email.set("adorofeev@icerockdev.com")
51+
}
52+
developer {
53+
id.set("Tetraquark")
54+
name.set("Vladislav Areshkin")
55+
email.set("vareshkin@icerockdev.com")
56+
}
57+
developer {
58+
id.set("Lobynya")
59+
name.set("Aleksey Lobynyan")
60+
email.set("alobynya@icerockdev.com")
61+
}
62+
developer {
63+
id.set("kovalandrew")
64+
name.set("Andrey Kovalev")
65+
email.set("kovalev@icerockdev.com")
66+
}
4267
}
4368

4469
scm {

widgets/src/androidMain/kotlin/dev/icerock/moko/widgets/core/screen/WidgetScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ actual abstract class WidgetScreen<Arg : Args> : Screen<Arg>() {
2323
override fun onCreateView(
2424
inflater: LayoutInflater,
2525
container: ViewGroup?,
26-
savedInstanceState: Bundle?,
26+
savedInstanceState: Bundle?
2727
): android.view.View? {
2828
val widget = createContentWidget()
2929
val view = widget.buildView(
@@ -64,7 +64,7 @@ actual abstract class WidgetScreen<Arg : Args> : Screen<Arg>() {
6464
override fun onScrolled(
6565
recyclerView: RecyclerView,
6666
dx: Int,
67-
dy: Int,
67+
dy: Int
6868
) {
6969
super.onScrolled(recyclerView, dx, dy)
7070
if (dy != 0) {

0 commit comments

Comments
 (0)