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

Commit 7f8f67a

Browse files
authored
Merge pull request #298 from icerockdev/develop
Release 0.1.0
2 parents b72f0be + 6d49562 commit 7f8f67a

File tree

241 files changed

+1926
-1642
lines changed

Some content is hidden

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

241 files changed

+1926
-1642
lines changed

.github/workflows/compilation-check.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v1
15-
- name: Set up JDK 1.8
15+
- name: Set up JDK 11
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 1.8
18+
java-version: 11
1919
- name: Cocoapods install
2020
run: (cd sample/ios-app && pod install)
2121
- name: Check build
22-
run: ./gradlew build
22+
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
2323
- name: Check plugin publication
2424
run: ./gradlew -p plugin publishToMavenLocal
25-
- name: Check runtime publication
26-
run: ./gradlew publishToMavenLocal
25+
- name: Install pods with kotlin
26+
run: cd sample/ios-app && pod install
27+
- name: build ios sample
28+
run: cd sample/ios-app && set -o pipefail && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty
29+

.github/workflows/publish-dev.yml

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

.github/workflows/publish.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
1-
name: KMP library publish production version
1+
name: Create release
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version'
8+
default: '0.1.0'
9+
required: true
610

711
jobs:
8-
build:
12+
publish:
13+
name: Publish library at mavenCentral
914
runs-on: macOS-latest
15+
env:
16+
OSSRH_USER: ${{ secrets.OSSRH_USER }}
17+
OSSRH_KEY: ${{ secrets.OSSRH_KEY }}
18+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }}
19+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
20+
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }}
1021

1122
steps:
1223
- uses: actions/checkout@v1
13-
- name: Set up JDK 1.8
24+
- name: Set up JDK 11
1425
uses: actions/setup-java@v1
1526
with:
16-
java-version: 1.8
17-
- name: Cocoapods install
18-
run: (cd sample/ios-app && pod install)
19-
- name: Plugin publication
20-
run: |
21-
./gradlew -p plugin \
22-
publishNoValidationToBintray \
23-
-DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} \
24-
--stacktrace
25-
- name: Runtime publication
26-
run: |
27-
./gradlew \
28-
publishNoValidationToBintray \
29-
-DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} \
30-
--stacktrace
27+
java-version: 11
28+
- name: Publish plugin
29+
run: ./gradlew -p plugin publishMavenJavaPublicationToOSSRHRepository
30+
- name: Publish library
31+
run: ./gradlew publish
32+
33+
release:
34+
name: Create release
35+
needs: publish
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Create Release
39+
id: create_release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
commitish: ${{ github.ref }}
45+
tag_name: release/${{ github.event.inputs.version }}
46+
release_name: ${{ github.event.inputs.version }}
47+
body: "Will be filled later"
48+
draft: true

README.md

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
![moko-widgets](https://user-images.githubusercontent.com/5010169/70204294-93a45900-1752-11ea-9bb6-820d514ceef9.png)
2-
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Download](https://api.bintray.com/packages/icerockdev/moko/moko-widgets/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-widgets/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.3.70-orange)
2+
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Download](https://img.shields.io/maven-central/v/dev.icerock.moko/moko-widgets) ](https://repo1.maven.org/maven2/dev/icerock/moko/moko-widgets) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=widgets)
33

44
# Mobile Kotlin widgets
55
This is a Kotlin MultiPlatform library that provides declarative UI and application screens management
66
in common code. You can implement full application for Android and iOS only from common code with it.
77

8-
## Current status
9-
Current version - `0.1.0-dev-19`. Dev version is not tested in production tasks yet, API can be changed and
10-
bugs may be found. But dev version is chance to test limits of API and concepts to feedback and improve lib.
11-
We open for any feedback and ideas (go to issues or #moko at [kotlinlang.slack.com](https://kotlinlang.slack.com))!
12-
13-
## Roadmap
14-
- December-January: Test library in real project;
15-
- February: production usage at IceRock;
16-
- March: 0.1.0 release with flexible API;
17-
- First half of 2020: more widgets, more factories; figma template and generation of screens.
18-
198
## Sample Screen
209
|Android|iOS|
2110
|---|---|
@@ -200,49 +189,24 @@ val loginScreen = Theme(baseTheme) {
200189
- **reactive data handling**.
201190

202191
## Requirements
203-
- Gradle version 5.6.4+
192+
- Gradle version 6.8+
204193
- Android API 16+
205-
- iOS version 9.0+
206-
207-
## Versions
208-
- kotlin 1.3.50
209-
- 0.1.0-dev-1
210-
- kotlin 1.3.60
211-
- 0.1.0-dev-2
212-
- 0.1.0-dev-3
213-
- 0.1.0-dev-4
214-
- 0.1.0-dev-5
215-
- kotlin 1.3.61
216-
- 0.1.0-dev-6
217-
- 0.1.0-dev-7
218-
- 0.1.0-dev-8
219-
- 0.1.0-dev-9
220-
- 0.1.0-dev-10
221-
- 0.1.0-dev-11
222-
- 0.1.0-dev-12
223-
- 0.1.0-dev-13
224-
- 0.1.0-dev-14
225-
- 0.1.0-dev-15
226-
- kotlin 1.3.70
227-
- 0.1.0-dev-16
228-
- 0.1.0-dev-17
229-
- 0.1.0-dev-18
230-
- 0.1.0-dev-19
194+
- iOS version 11.0+
231195

232196
## Installation
233197
root build.gradle
234198
```groovy
235199
allprojects {
236200
repositories {
237-
maven { url = "https://dl.bintray.com/icerockdev/moko" }
201+
mavenCentral()
238202
}
239203
}
240204
```
241205

242206
project build.gradle
243207
```groovy
244208
dependencies {
245-
commonMainApi("dev.icerock.moko:widgets:0.1.0-dev-19")
209+
classpath("dev.icerock.moko:widgets:0.1.0")
246210
}
247211
```
248212

@@ -251,11 +215,11 @@ root build.gradle
251215
```groovy
252216
buildscript {
253217
repositories {
254-
maven { url = "https://dl.bintray.com/icerockdev/plugins" } // gradle plugin
218+
mavenCentral()
255219
}
256220
257221
dependencies {
258-
classpath "dev.icerock.moko.widgets:gradle-plugin:0.1.0-dev-19"
222+
classpath "dev.icerock.moko.widgets:gradle-plugin:0.1.0"
259223
}
260224
}
261225

build.gradle.kts

Lines changed: 7 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,20 @@
44

55
buildscript {
66
repositories {
7-
jcenter()
7+
mavenCentral()
88
google()
9-
10-
maven { url = uri("https://dl.bintray.com/kotlin/kotlin") }
11-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
12-
maven { url = uri("https://plugins.gradle.org/m2/") }
13-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
14-
15-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins-dev") }
9+
gradlePluginPortal()
10+
jcenter()
1611
}
1712
dependencies {
18-
Deps.plugins.values.forEach { classpath(it) }
13+
classpath("dev.icerock.moko:resources-generator:0.16.1")
14+
classpath("dev.icerock.moko.widgets:gradle-plugin")
15+
16+
classpath(":widgets-build-logic")
1917
}
2018
}
2119

2220
allprojects {
23-
repositories {
24-
google()
25-
jcenter()
26-
27-
maven { url = uri("https://kotlin.bintray.com/kotlin") }
28-
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
29-
maven { url = uri("https://dl.bintray.com/icerockdev/moko") }
30-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
31-
maven { url = uri("http://dl.bintray.com/lukaville/maven") }
32-
33-
maven { url = uri("https://dl.bintray.com/icerockdev/moko-dev") }
34-
maven { url = uri("https://dl.bintray.com/icerockdev/plugins-dev") }
35-
}
36-
37-
// Workaround for https://youtrack.jetbrains.com/issue/KT-36721.
38-
pluginManager.withPlugin("kotlin-multiplatform") {
39-
val kotlinExtension = project.extensions.getByName("kotlin")
40-
as org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
41-
val uniqueName = "${project.group}.${project.name}"
42-
43-
kotlinExtension.targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget::class.java) {
44-
compilations["main"].kotlinOptions.freeCompilerArgs += listOf(
45-
"-module-name",
46-
uniqueName
47-
)
48-
}
49-
}
50-
5121
configurations
5222
.matching { it.name == "compileOnly" }
5323
.configureEach {
@@ -56,55 +26,6 @@ allprojects {
5626
"compileOnly"("javax.annotation:jsr250-api:1.0")
5727
}
5828
}
59-
60-
val project = this
61-
val bintrayPath: Pair<String, String>?
62-
when {
63-
this.name.startsWith("widgets") -> {
64-
bintrayPath = "moko" to "moko-widgets"
65-
66-
this.group = "dev.icerock.moko"
67-
this.version = Versions.Libs.MultiPlatform.mokoWidgets
68-
69-
this.plugins.withType<com.android.build.gradle.LibraryPlugin> {
70-
this@allprojects.configure<com.android.build.gradle.LibraryExtension> {
71-
compileSdkVersion(Versions.Android.compileSdk)
72-
73-
defaultConfig {
74-
minSdkVersion(Versions.Android.minSdk)
75-
targetSdkVersion(Versions.Android.targetSdk)
76-
}
77-
}
78-
}
79-
}
80-
else -> {
81-
bintrayPath = null
82-
}
83-
}
84-
85-
if (bintrayPath != null) {
86-
project.plugins.withType<MavenPublishPlugin> {
87-
project.configure<PublishingExtension> {
88-
val repo = bintrayPath.first
89-
val artifact = bintrayPath.second
90-
val isDevPublish = project.properties.containsKey("devPublish")
91-
val fullRepoName = if (isDevPublish) "$repo-dev" else repo
92-
val mavenUrl =
93-
"https://api.bintray.com/maven/icerockdev/$fullRepoName/$artifact/;publish=1"
94-
95-
repositories.maven(mavenUrl) {
96-
this.name = "bintray"
97-
98-
credentials {
99-
username = System.getProperty("BINTRAY_USER")
100-
password = System.getProperty("BINTRAY_KEY")
101-
}
102-
}
103-
}
104-
}
105-
106-
apply<dev.icerock.moko.widgets.gradle.BintrayPublishingPlugin>()
107-
}
10829
}
10930

11031
tasks.register("clean", Delete::class).configure {

buildSrc/build.gradle.kts

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

0 commit comments

Comments
 (0)