Skip to content

Commit ad0e4a2

Browse files
committed
Merge remote-tracking branch 'our_template/master'
# Conflicts: # .github/workflows/pull-request.yml # .github/workflows/release.yml # .gitignore # README.md # build.gradle.kts # gradle.properties # gradle/wrapper/gradle-wrapper.properties # library/build.gradle.kts # library/gradle.properties # library/src/androidMain/AndroidManifest.xml # settings.gradle.kts
2 parents e929aef + 5624ed2 commit ad0e4a2

File tree

16 files changed

+120
-41
lines changed

16 files changed

+120
-41
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-java@v1
1313
with:
14-
java-version: 11
14+
java-version: 17
1515
- name: Setup cocoapods
1616
run: gem install cocoapods-generate
1717
- name: Static Analysis

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-java@v1
1313
with:
14-
java-version: 11
14+
java-version: 17
1515
- name: Update version property
1616
uses: Reedyuk/write-properties@v1.0.3
1717
with:

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,6 @@ fastlane/test_output
242242
# After new code Injection tools there's a generated folder /iOSInjectionProject
243243
# https://github.com/johnno1962/injectionforxcode
244244

245-
iOSInjectionProject/
245+
iOSInjectionProject/
246+
247+
*.podspec

build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("org.jetbrains.kotlinx.kover") version "0.6.1"
2+
alias(testingLibs.plugins.kover)
33
}
44

55
kover {
@@ -14,10 +14,11 @@ buildscript {
1414
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
1515
}
1616
dependencies {
17-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0-RC")
18-
classpath("com.android.tools.build:gradle:7.0.4")
19-
classpath("org.jlleitschuh.gradle.ktlint:org.jlleitschuh.gradle.ktlint.gradle.plugin:11.4.0")
20-
classpath("io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.22.0")
17+
classpath("org.jlleitschuh.gradle.ktlint:org.jlleitschuh.gradle.ktlint.gradle.plugin:11.0.0")
18+
classpath(libs.android.build.tools)
19+
classpath(libs.gradle.plugin)
20+
classpath(testingLibs.detekt)
21+
classpath(testingLibs.kotest.plugin)
2122
}
2223
}
2324

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ POM_DEVELOPER_EMAIL=app.team@myunidays.com
99
kotlin.native.binary.memoryModel=experimental
1010

1111
kotlin.mpp.enableCInteropCommonization=true
12+
kotlin.mpp.enableCInteropCommonization.nowarn=true
1213

1314
kotlin.native.cacheKind=none
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

library/build.gradle.kts

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
22

33
val MODULE_PACKAGE_NAME: String by project
44
val MODULE_NAME: String by project
@@ -8,12 +8,16 @@ val PUBLISH_NAME: String by project
88
group = MODULE_PACKAGE_NAME
99
version = MODULE_VERSION_NUMBER
1010

11+
kotlin {
12+
jvmToolchain(libs.versions.jvm.get().toInt())
13+
}
14+
1115
plugins {
1216
kotlin("multiplatform")
1317
id("com.android.library")
14-
kotlin("native.cocoapods")
1518
id("org.jlleitschuh.gradle.ktlint")
1619
id("io.gitlab.arturbosch.detekt")
20+
kotlin("native.cocoapods")
1721
id("io.github.luca992.multiplatform-swiftpackage") version "2.1.1"
1822
signing
1923
`maven-publish`
@@ -26,27 +30,32 @@ ktlint {
2630
detekt {
2731
config = files("./custom-detekt-config.yml")
2832
buildUponDefaultConfig = true // preconfigure defaults
29-
input = files("src/commonMain/kotlin")
33+
source.setFrom(
34+
"src/commonMain/kotlin",
35+
"src/androidMain/kotlin",
36+
"src/iosMain/kotlin"
37+
)
3038
autoCorrect = false
31-
32-
reports {
33-
html.enabled = true
34-
xml.enabled = true
35-
txt.enabled = true
36-
sarif.enabled = true
37-
}
3839
}
3940

4041
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
41-
// Target version of the generated JVM bytecode. It is used for type resolution.
42-
jvmTarget = "1.8"
42+
jvmTarget = libs.versions.jvm.get()
43+
reports {
44+
html.required.set(true)
45+
xml.required.set(true)
46+
txt.required.set(true)
47+
sarif.required.set(true)
48+
}
4349
}
4450

4551
kotlin {
46-
android {
52+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
53+
targetHierarchy.default()
54+
androidTarget {
4755
publishAllLibraryVariants()
4856
publishLibraryVariantsGroupedByFlavor = true
4957
}
58+
5059
ios()
5160
iosSimulatorArm64()
5261
cocoapods {
@@ -63,6 +72,7 @@ kotlin {
6372
pod("FlipperKit/SKIOSNetworkPlugin")
6473
pod("FlipperKit/FlipperKitUserDefaultsPlugin")
6574
}
75+
6676
sourceSets {
6777
val commonMain by getting {
6878
dependencies {
@@ -97,16 +107,21 @@ kotlin {
97107
}
98108

99109
android {
100-
compileSdk = 31
101-
buildToolsVersion = "30.0.3"
110+
compileSdk = androidVersions.versions.compileSdk.get().toInt()
111+
buildToolsVersion = androidVersions.versions.buildToolsVersion.get()
102112
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
113+
namespace = MODULE_PACKAGE_NAME
103114
defaultConfig {
104-
minSdk = 23
105-
targetSdk = 31
115+
minSdk = androidVersions.versions.minSdk.get().toInt()
106116
}
107117
compileOptions {
108-
sourceCompatibility = JavaVersion.VERSION_11
109-
targetCompatibility = JavaVersion.VERSION_11
118+
sourceCompatibility = JavaVersion.VERSION_17
119+
targetCompatibility = JavaVersion.VERSION_17
120+
}
121+
buildTypes {
122+
getByName("release") {
123+
isMinifyEnabled = false
124+
}
110125
}
111126
}
112127

@@ -195,3 +210,8 @@ multiplatformSwiftPackage {
195210
iOS { v("16.4") }
196211
}
197212
}
213+
214+
tasks.withType<AbstractPublishToMaven>().configureEach {
215+
val signingTasks = tasks.withType<Sign>()
216+
mustRunAfter(signingTasks)
217+
}

library/custom-detekt-config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
build:
22
maxIssues: 0
3-
excludeCorrectable: false
3+
excludeCorrectable: false
4+
5+
naming:
6+
active: true
7+
MatchingDeclarationName:
8+
active: false

library/gradle.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
kotlin.js.compiler=ir
2-
kotlin.mpp.enableCInteropCommonization=true
3-
41
signing.keyId=""
52
signing.password=""
63

74
MODULE_PACKAGE_NAME=com.myunidays
8-
MODULE_VERSION_NUMBER=0.0.3
5+
MODULE_VERSION_NUMBER=0.1.0
96
MODULE_NAME=klipper
107

118
OPEN_SOURCE_REPO=https://oss.sonatype.org/service/local/staging/deploy/maven2/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myunidays.klipper"/>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />

0 commit comments

Comments
 (0)