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

Update to Kotlin 1.9.21 #55

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
source 'https://rubygems.org'

gem 'cocoapods', '~> 1.13'
gem 'cocoapods', '~> 1.14'
gem 'cocoapods-generate', '~> 2.2'
gem 'activesupport', '7.0.8' # Temporary workaround to fix cocoapods plugin crashing with v7.1.1
29 changes: 20 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.8)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.4)
claide (1.1.0)
cocoapods (1.13.0)
cocoapods (1.14.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.13.0)
cocoapods-core (= 1.14.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -33,7 +40,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.13.0)
cocoapods-core (1.14.3)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -45,7 +52,7 @@ GEM
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-disable-podfile-validations (0.2.0)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-generate (2.2.4)
cocoapods-disable-podfile-validations (>= 0.1.1, < 0.3.0)
cocoapods-plugins (1.0.0)
Expand All @@ -57,6 +64,9 @@ GEM
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
Expand All @@ -70,13 +80,15 @@ GEM
json (2.6.3)
minitest (5.20.0)
molinillo (0.8.0)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ruby2_keywords (0.0.5)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand All @@ -92,8 +104,7 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (= 7.0.8)
cocoapods (~> 1.13)
cocoapods (~> 1.14)
cocoapods-generate (~> 2.2)

BUNDLED WITH
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://user-images.githubusercontent.com/5982196/202266973-6cec2e9e-627d-4a97-a664-eef04d1e07d3.png" width="600" />
<p><br />This repository is the stable base upon which we build our Kotlin Multiplatform projects at Mirego.<br />We want to share it with the world so you can build awesome multiplatform applications too.</p>
<a href="https://github.com/mirego/kmp-boilerplate/actions/workflows/ci.yml"><img src="https://github.com/mirego/kmp-boilerplate/actions/workflows/ci.yaml/badge.svg"/></a>
<a href="https://kotlinlang.org/"><img src="https://img.shields.io/badge/kotlin-1.9.10-blue.svg?logo=kotlin"/></a>
<a href="https://kotlinlang.org/"><img src="https://img.shields.io/badge/kotlin-1.9.20-blue.svg?logo=kotlin"/></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg"/></a>
</div>

Expand All @@ -16,7 +16,7 @@ our [blog post](https://shift.mirego.com/en/boilerplate-projects).
This boilerplate comes with batteries included, you’ll find:

- A brand new [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) project using
[Kotlin 1.9.10](https://github.com/JetBrains/kotlin/releases/tag/v1.9.10) and
[Kotlin 1.9.21](https://github.com/JetBrains/kotlin/releases/tag/v1.9.21) and
the [Cocoapods Plugin](https://kotlinlang.org/docs/native-cocoapods.html)
- An Android app using [Jetpack Compose](https://developer.android.com/jetpack/compose)
- An iOS app using [SwiftUI](https://developer.apple.com/xcode/swiftui)
Expand All @@ -36,9 +36,12 @@ This boilerplate comes with batteries included, you’ll find:
## Usage

There are 2 ways to use this boilerplate:
1. From the [`main` branch](https://github.com/mirego/kmp-boilerplate/tree/main) — This branch is the "lean" version, it does not contain any strongly opinionated

1. From the [`main` branch](https://github.com/mirego/kmp-boilerplate/tree/main) — This branch is
the "lean" version, it does not contain any strongly opinionated
libraries or tools. It is a good starting point if you want to build your own boilerplate.
2. From the [`main-full` branch](https://github.com/mirego/kmp-boilerplate/tree/main-full) — This branch contains all the opinionated libraries and tools
2. From the [`main-full` branch](https://github.com/mirego/kmp-boilerplate/tree/main-full) — This
branch contains all the opinionated libraries and tools
described in the [Preferred libraries](#preferred-libraries) section. It is a good starting
point if you want to quickly start building your app the _Mirego way_.

Expand Down Expand Up @@ -97,7 +100,12 @@ started:

## OWASP Dependency-Check

[OWASP Dependency-Check](http://jeremylong.github.io/DependencyCheck/index.html) is installed as a Gradle plugin to scan your project to identify the use of known vulnerable components. It mainly checks for vulnerabilities in Gradle dependencies, but if [bundle-audit](https://github.com/rubysec/bundler-audit) is present on the system, it will also scan the Ruby Gems dependencies. It also has the capability to scan for Cocoapods/Swift Package Manager dependencies if executed on a macOS system.
[OWASP Dependency-Check](http://jeremylong.github.io/DependencyCheck/index.html) is installed as a
Gradle plugin to scan your project to identify the use of known vulnerable components. It mainly
checks for vulnerabilities in Gradle dependencies, but
if [bundle-audit](https://github.com/rubysec/bundler-audit) is present on the system, it will also
scan the Ruby Gems dependencies. It also has the capability to scan for Cocoapods/Swift Package
Manager dependencies if executed on a macOS system.

## License

Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
androidComposeCompiler = "1.5.3"
androidGradlePlugin = "8.1.2"
androidxActivityCompose = "1.8.0"
androidComposeCompiler = "1.5.6"
androidGradlePlugin = "8.2.0"
androidxActivityCompose = "1.8.1"
androidxAppcompat = "1.6.1"
androidxComposeBom = "2023.10.01"
kotlin = "1.9.10"
kotlin = "1.9.21"
kotlinxCoroutines = "1.7.3"
kotlinxSerialization = "1.6.0"
ktlint = "11.6.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 12 13:41:45 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could update Gradle to 8.5 unless something is preventing us to do so

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thanks I didn't know we could update to the latest. I did the update following Android Studio's Upgrade Assistant! I'll update to 8.5 in a new PR. Thanks 🙂

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion ios/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'cocoapods', '~> 1.13'
gem 'cocoapods', '~> 1.14'
28 changes: 20 additions & 8 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.8)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.4)
claide (1.1.0)
cocoapods (1.13.0)
cocoapods (1.14.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.13.0)
cocoapods-core (= 1.14.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -33,7 +40,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.13.0)
cocoapods-core (1.14.3)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -44,7 +51,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -54,6 +61,9 @@ GEM
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
Expand All @@ -67,13 +77,15 @@ GEM
json (2.6.3)
minitest (5.20.0)
molinillo (0.8.0)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ruby2_keywords (0.0.5)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand All @@ -89,7 +101,7 @@ PLATFORMS
arm64-darwin-23

DEPENDENCIES
cocoapods (~> 1.13)
cocoapods (~> 1.14)

BUNDLED WITH
2.4.20
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 83ebf5d7b61ce65029f18160027c7392430ee27f

COCOAPODS: 1.13.0
COCOAPODS: 1.14.3
6 changes: 2 additions & 4 deletions ios/iosApp/GreetingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ struct GreetingView: View {
}
}

struct GreetingView_Previews: PreviewProvider {
static var previews: some View {
GreetingView()
}
#Preview {
GreetingView()
}
11 changes: 11 additions & 0 deletions shared/Shared.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Pod::Spec.new do |spec|



if !Dir.exist?('build/cocoapods/framework/Shared.framework') || Dir.empty?('build/cocoapods/framework/Shared.framework')
raise "

Kotlin framework 'Shared' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:

./gradlew :shared:generateDummyFramework

Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':shared',
'PRODUCT_MODULE_NAME' => 'Shared',
Expand Down
29 changes: 11 additions & 18 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("UNUSED_VARIABLE")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.native.cocoapods)
Expand All @@ -16,7 +18,8 @@ kotlin {
androidTarget {
publishAllLibraryVariants()
}
ios()
iosX64()
iosArm64()
iosSimulatorArm64()

cocoapods {
Expand All @@ -38,33 +41,24 @@ kotlin {
}
}

val commonMain by getting {
commonMain {
dependencies {
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)
}
}
val commonTest by getting {

commonTest {
dependencies {
implementation(kotlin("test"))
implementation(libs.kotlinx.coroutines.test)
}
}
val androidMain by getting
val androidUnitTest by getting
}

val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by getting {
iosSimulatorArm64Main.dependsOn(this)
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by getting {
iosSimulatorArm64Test.dependsOn(this)
}
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}

Expand All @@ -76,7 +70,6 @@ android {
defaultConfig {
minSdk = 21
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
Loading