Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#294 gradle 7.0.2 kotlin 1.5.20, convention-plugin #297

Merged
merged 16 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Check build
run: ./gradlew build
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
- name: Check plugin publication
run: ./gradlew -p plugin publishToMavenLocal
- name: Check runtime publication
run: ./gradlew publishToMavenLocal
- name: Install pods with kotlin
run: cd sample/ios-app && pod install
- name: build ios sample
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

33 changes: 0 additions & 33 deletions .github/workflows/publish-dev.yml

This file was deleted.

58 changes: 38 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
name: KMP library publish production version
name: Create release

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version'
default: '0.1.0'
required: true

jobs:
build:
publish:
name: Publish library at mavenCentral
runs-on: macOS-latest
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_KEY: ${{ secrets.OSSRH_KEY }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }}

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Plugin publication
Alex009 marked this conversation as resolved.
Show resolved Hide resolved
run: |
./gradlew -p plugin \
publishNoValidationToBintray \
-DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} \
--stacktrace
- name: Runtime publication
run: |
./gradlew \
publishNoValidationToBintray \
-DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} \
--stacktrace
java-version: 11
- name: Publish plugin
run: ./gradlew -p widgets-generator publishMavenJavaPublicationToOSSRHRepository
Alex009 marked this conversation as resolved.
Show resolved Hide resolved
- name: Publish library
run: ./gradlew publish

release:
name: Create release
needs: publish
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: ${{ github.ref }}
tag_name: release/${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: "Will be filled later"
draft: true
50 changes: 7 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
![moko-widgets](https://user-images.githubusercontent.com/5010169/70204294-93a45900-1752-11ea-9bb6-820d514ceef9.png)
[![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)
[![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)

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

## Current status
Current version - `0.1.0-dev-19`. Dev version is not tested in production tasks yet, API can be changed and
bugs may be found. But dev version is chance to test limits of API and concepts to feedback and improve lib.
We open for any feedback and ideas (go to issues or #moko at [kotlinlang.slack.com](https://kotlinlang.slack.com))!

## Roadmap
- December-January: Test library in real project;
- February: production usage at IceRock;
- March: 0.1.0 release with flexible API;
- First half of 2020: more widgets, more factories; figma template and generation of screens.

## Sample Screen
|Android|iOS|
|---|---|
Expand Down Expand Up @@ -200,49 +189,24 @@ val loginScreen = Theme(baseTheme) {
- **reactive data handling**.

## Requirements
- Gradle version 5.6.4+
- Gradle version 6.8+
- Android API 16+
- iOS version 9.0+

## Versions
- kotlin 1.3.50
- 0.1.0-dev-1
- kotlin 1.3.60
- 0.1.0-dev-2
- 0.1.0-dev-3
- 0.1.0-dev-4
- 0.1.0-dev-5
- kotlin 1.3.61
- 0.1.0-dev-6
- 0.1.0-dev-7
- 0.1.0-dev-8
- 0.1.0-dev-9
- 0.1.0-dev-10
- 0.1.0-dev-11
- 0.1.0-dev-12
- 0.1.0-dev-13
- 0.1.0-dev-14
- 0.1.0-dev-15
- kotlin 1.3.70
- 0.1.0-dev-16
- 0.1.0-dev-17
- 0.1.0-dev-18
- 0.1.0-dev-19
- iOS version 11.0+

## Installation
root build.gradle
```groovy
allprojects {
repositories {
maven { url = "https://dl.bintray.com/icerockdev/moko" }
mavenCentral()
}
}
```

project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:widgets:0.1.0-dev-19")
classpath("dev.icerock.moko:widgets:0.1.0")
}
```

Expand All @@ -251,11 +215,11 @@ root build.gradle
```groovy
buildscript {
repositories {
maven { url = "https://dl.bintray.com/icerockdev/plugins" } // gradle plugin
mavenCentral()
}

dependencies {
classpath "dev.icerock.moko.widgets:gradle-plugin:0.1.0-dev-19"
classpath "dev.icerock.moko.widgets:gradle-plugin:0.1.0"
}
}

Expand Down
87 changes: 7 additions & 80 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,20 @@

buildscript {
repositories {
jcenter()
mavenCentral()
google()

maven { url = uri("https://dl.bintray.com/kotlin/kotlin") }
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
maven { url = uri("https://plugins.gradle.org/m2/") }
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
gradlePluginPortal()
jcenter()
}
dependencies {
classpath("dev.icerock.moko:resources-generator:0.13.2")
classpath("dev.icerock.moko.widgets:gradle-plugin:0.1.0-dev-21")
classpath("gradle:moko-widgets-deps:1")
classpath("dev.icerock.moko:resources-generator:0.16.1")
classpath("dev.icerock.moko.widgets:gradle-plugin")

classpath(":widgets-build-logic")
}
}

allprojects {
repositories {
google()
jcenter()

maven { url = uri("https://kotlin.bintray.com/kotlin") }
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
maven { url = uri("https://dl.bintray.com/icerockdev/moko") }
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") }
maven { url = uri("http://dl.bintray.com/lukaville/maven") }

maven { url = uri("https://dl.bintray.com/icerockdev/moko-dev") }
maven { url = uri("https://dl.bintray.com/icerockdev/plugins-dev") }
}

configurations
.matching { it.name == "compileOnly" }
.configureEach {
Expand All @@ -42,63 +26,6 @@ allprojects {
"compileOnly"("javax.annotation:jsr250-api:1.0")
}
}

configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.nbsp:library"))
.using(module("com.nbsp:materialfilepicker:1.9.1"))
.because("androidx support in new artifact")
Alex009 marked this conversation as resolved.
Show resolved Hide resolved
}
}

plugins.withType<com.android.build.gradle.LibraryPlugin> {
configure<com.android.build.gradle.LibraryExtension> {
compileSdkVersion(Deps.Android.compileSdk)

defaultConfig {
minSdkVersion(Deps.Android.minSdk)
targetSdkVersion(Deps.Android.targetSdk)
}
}
}

val project = this
val bintrayPath: Pair<String, String>?
when {
this.name.startsWith("widgets") -> {
bintrayPath = "moko" to "moko-widgets"

this.group = "dev.icerock.moko"
this.version = Deps.mokoWidgetsVersion
}
else -> {
bintrayPath = null
}
}

if (bintrayPath != null) {
project.plugins.withType<MavenPublishPlugin> {
project.configure<PublishingExtension> {
val repo = bintrayPath.first
val artifact = bintrayPath.second
val isDevPublish = project.properties.containsKey("devPublish")
val fullRepoName = if (isDevPublish) "$repo-dev" else repo
val mavenUrl =
"https://api.bintray.com/maven/icerockdev/$fullRepoName/$artifact/;publish=1"

repositories.maven(mavenUrl) {
this.name = "bintray"

credentials {
username = System.getProperty("BINTRAY_USER")
password = System.getProperty("BINTRAY_KEY")
}
}
}
}

apply<dev.icerock.moko.widgets.gradle.BintrayPublishingPlugin>()
}
}

tasks.register("clean", Delete::class).configure {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ org.gradle.parallel=true

kotlin.code.style=official

android.useAndroidX=true
kotlin.native.enableDependencyPropagation=false
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.enableCompatibilityMetadataVariant=true

# Workaround for Bintray treating .sha512 files as artifacts
# https://github.com/gradle/gradle/issues/11412
systemProp.org.gradle.internal.publish.checksums.insecure=true
android.useAndroidX=true

mobile.multiplatform.useIosShortcut=false
mobile.multiplatform.iosTargetWarning=false
Expand Down
Loading