Skip to content

Commit

Permalink
Merge pull request #60 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
anton6tak authored Jul 14, 2021
2 parents d54e325 + 13ca1e9 commit b87a7d8
Show file tree
Hide file tree
Showing 32 changed files with 468 additions and 497 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,27 @@ on:
jobs:
build:
runs-on: macOS-latest

env:
MAPBOX_SECRET_TOKEN: ${{ secrets.MAPBOX_SECRET_TOKEN }}
MAPBOX_PUBLIC_TOKEN: ${{ secrets.MAPBOX_PUBLIC_TOKEN }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
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: Set up netrc
uses: extractions/netrc@v1
with:
machine: api.mapbox.com
username: mapbox
password: ${{ secrets.MAPBOX_SECRET_TOKEN }}
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Build K/N cache
run: ./gradlew :maps:runCommonizer
- name: Check library
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
- name: Install pods with kotlin
run: cd sample/ios-app && pod install
- name: build ios sample
run: cd sample/ios-app && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
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
18 changes: 12 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,23 @@ jobs:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }}

MAPBOX_SECRET_TOKEN: ${{ secrets.MAPBOX_SECRET_TOKEN }}
MAPBOX_PUBLIC_TOKEN: ${{ secrets.MAPBOX_PUBLIC_TOKEN }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
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: Set up netrc
uses: extractions/netrc@v1
with:
machine: api.mapbox.com
username: mapbox
password: ${{ secrets.MAPBOX_SECRET_TOKEN }}
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Build K/N cache
run: ./gradlew :maps:runCommonizer
- name: Publish library
run: ./gradlew publish
release:
Expand All @@ -44,6 +50,6 @@ jobs:
with:
commitish: ${{ github.ref }}
tag_name: release/${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: "Will be filled later"
draft: true
53 changes: 27 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
![moko-maps](https://user-images.githubusercontent.com/5010169/71351401-27c14d80-25a6-11ea-9183-17821f6d4212.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://img.shields.io/maven-central/v/dev.icerock.moko/maps) ](https://repo1.maven.org/maven2/dev/icerock/moko/maps) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.31-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/maps) ](https://repo1.maven.org/maven2/dev/icerock/moko/maps) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=maps)

# Mobile Kotlin maps module
This is a Kotlin Multiplatform library that provides controls of maps to common code.

## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Versions](#versions)
- [Installation](#installation)
- [Usage](#usage)
- [Samples](#samples)
Expand All @@ -25,26 +24,6 @@ This is a Kotlin Multiplatform library that provides controls of maps to common
- Android API 16+
- iOS version 9.0+

## Versions
### Bintray
- kotlin 1.3.61
- 0.1.0
- 0.1.1
- 0.2.0
- 0.2.1
- 0.3.0
- 0.4.0-dev-1
- kotlin 1.3.70
- 0.4.0-dev-2
- 0.4.0-dev-3
- 0.4.0-dev-4
- kotlin 1.4.10
- 0.5.0
- 0.5.1
### mavenCentral
- kotlin 1.4.31
- 0.5.2

## Installation
root build.gradle
```groovy
Expand All @@ -59,9 +38,9 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:maps:0.5.2")
commonMainApi("dev.icerock.moko:maps-google:0.5.2")
commonMainApi("dev.icerock.moko:maps-mapbox:0.5.2")
commonMainApi("dev.icerock.moko:maps:0.6.0")
commonMainApi("dev.icerock.moko:maps-google:0.6.0")
commonMainApi("dev.icerock.moko:maps-mapbox:0.6.0")
}
kotlin.targets
Expand Down Expand Up @@ -191,7 +170,29 @@ class MarkerViewModel(
## Samples
Please see more examples in the [sample directory](sample).

## Set Up Locally
## Set Up Locally
Before open project need to setup `gradle.properties` with tokens:
```
# mapbox tokens by guide https://docs.mapbox.com/android/maps/guides/install/
mapbox.secretToken=YOUR_SECRET_MAPBOX_KEY
mapbox.publicToken=YOUR_PUBLIC_MAPBOX_KEY
# google maps api key by guide https://developers.google.com/maps/documentation/android-sdk/get-api-key
googleMaps.apiKey=YOUR_API_KEY
```

# ios info.plist setup with tokens:
```
MGLMapboxAccessToken=YOUR_PUBLIC_MAPBOX_KEY
GoogleAPIkey=YOUR_API_KEY
```
add the following entry to your `.netrc` file:
```
machine api.mapbox.com
login mapbox
password YOUR_SECRET_MAPBOX_KEY
```

- The [maps directory](maps) contains the base classes for all maps providers;
- The [maps-google directory](maps-google) contains the Google Maps implementation;
- The [maps-mapbox directory](maps-mapbox) contains the mapbox implementation;
Expand Down
140 changes: 15 additions & 125 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,144 +1,34 @@
/*
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

import java.util.Base64

plugins {
plugin(Deps.Plugins.detekt) apply false
}
import org.gradle.api.internal.artifacts.DefaultModuleVersionSelector

buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()

jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
dependencies {
plugin(Deps.Plugins.mokoResources)
plugin(Deps.Plugins.kotlinSerialization)
classpath(":maps-build-logic")
classpath("dev.icerock.moko:resources-generator:0.16.1")
classpath("org.jetbrains.kotlin:kotlin-serialization:1.5.20")
}
}

allprojects {
repositories {
mavenCentral()
google()

maven { url = uri("https://mapbox.bintray.com/mapbox") }

jcenter {
content {
includeGroup("org.jetbrains.trove4j")
includeGroup("org.jetbrains.kotlinx")
}
}
}

apply(plugin = Deps.Plugins.detekt.id)

configure<io.gitlab.arturbosch.detekt.extensions.DetektExtension> {
input.setFrom(
"src/commonMain/kotlin",
"src/androidMain/kotlin",
"src/iosMain/kotlin",
"src/iosX64Main/kotlin"
)
}

dependencies {
"detektPlugins"(Deps.Libs.Detekt.detektFormatting)
}

plugins.withId(Deps.Plugins.androidLibrary.id) {
configure<com.android.build.gradle.LibraryExtension> {
compileSdkVersion(Deps.Android.compileSdk)

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

plugins.withId(Deps.Plugins.mavenPublish.id) {
plugins.withId("org.gradle.maven-publish") {
group = "dev.icerock.moko"
version = Deps.mokoMapsVersion

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

configure<PublishingExtension> {
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
name = "OSSRH"

credentials {
username = System.getenv("OSSRH_USER")
password = System.getenv("OSSRH_KEY")
}
}

publications.withType<MavenPublication> {
// Stub javadoc.jar artifact
artifact(javadocJar.get())

// Provide artifacts information requited by Maven Central
pom {
name.set("MOKO maps")
description.set("Control your map from common code for mobile (android & ios) Kotlin Multiplatform development")
url.set("https://github.com/icerockdev/moko-maps")
licenses {
license {
url.set("https://github.com/icerockdev/moko-maps/blob/master/LICENSE.md")
}
}

developers {
developer {
id.set("Alex009")
name.set("Aleksey Mikhailov")
email.set("aleksey.mikhailov@icerockdev.com")
}
developer {
id.set("prokopishin")
name.set("Nikita Prokopishin")
email.set("nprokopishin@icerockdev.com")
}
developer {
id.set("Dorofeev")
name.set("Andrey Dorofeev")
email.set("adorofeev@icerockdev.com")
}
}

scm {
connection.set("scm:git:ssh://github.com/icerockdev/moko-maps.git")
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-maps.git")
url.set("https://github.com/icerockdev/moko-maps")
}
}
}

apply(plugin = Deps.Plugins.signing.id)

configure<SigningExtension> {
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
String(Base64.getDecoder().decode(base64Key))
}
if (signingKeyId != null) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publications)
}
}
version = libs.versions.mokoMapsVersion.get()
}
configurations.configureEach {
resolutionStrategy {
val coroutines: MinimalExternalModuleDependency = rootProject.libs.coroutines.get()
val forcedCoroutines: ModuleVersionSelector = DefaultModuleVersionSelector.newSelector(
coroutines.module,
coroutines.versionConstraint.requiredVersion
)
force(forcedCoroutines)
}
}
}
Expand Down
24 changes: 0 additions & 24 deletions buildSrc/build.gradle.kts

This file was deleted.

Loading

0 comments on commit b87a7d8

Please # to comment.