-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dzmpr/feat/TRCKR-T-5_support_multiplatform
TRCKR-T-5 add multiplatform support
- Loading branch information
Showing
55 changed files
with
204 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
name: Tests | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow pull request events but only for the "main" branch | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
tests: | ||
name: Run unit tests | ||
runs-on: macos-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
distribution: 'temurin' | ||
java-version: '8' | ||
|
||
- name: Run tests | ||
# Temporary run tests only for JVM target, because ios/watchos/tvos tests fail. | ||
# TODO: https://youtrack.jetbrains.com/issue/KT-54814 | ||
run: ./gradlew jvmTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### Changelog | ||
* Add kotlin multiplatform support. | ||
|
||
### Dependencies | ||
| Dependency | Version | | ||
|------------|:--------------:| | ||
| Kotlin | `1.7.20` | | ||
| KSP | `1.7.20-1.0.7` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,61 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
@Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
alias(libs.plugins.kotlin.multiplatform) | ||
id("trckr-artifact") | ||
} | ||
|
||
dependencies { | ||
testImplementation(libs.kotlin.test) | ||
testImplementation(libs.mockk) | ||
kotlin { | ||
// Targets | ||
|
||
// JVM target | ||
jvm { | ||
compilations.all { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
testRuns["test"].executionTask.configure { | ||
useJUnitPlatform() | ||
} | ||
} | ||
// JS target | ||
// TODO: Currently not support arrays in annotations | ||
// js(BOTH) { | ||
// browser() | ||
// nodejs() | ||
// } | ||
// iOS targets | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
// watchOS targets | ||
watchosArm32() | ||
watchosArm64() | ||
watchosX64() | ||
watchosSimulatorArm64() | ||
// tvOS targets | ||
tvosArm64() | ||
tvosX64() | ||
tvosSimulatorArm64() | ||
// macOS targets | ||
macosX64() | ||
macosArm64() | ||
// Linux targets | ||
linuxArm64() | ||
linuxX64() | ||
// MinGW targets | ||
mingwX64() | ||
|
||
// SourceSets | ||
sourceSets { | ||
commonTest { | ||
dependencies { | ||
implementation(libs.kotlin.test) | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
.../cookedapp/trckr/core/TrckrBuilderTest.kt → .../cookedapp/trckr/core/TrckrBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
trckr-core/src/commonTest/kotlin/ru/cookedapp/trckr/core/testHelpers/FakeAdapters.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ru.cookedapp.trckr.core.testHelpers | ||
|
||
import ru.cookedapp.trckr.core.adapter.TrackerAdapter | ||
|
||
internal interface FirstAdapter : TrackerAdapter | ||
|
||
internal interface SecondAdapter : TrackerAdapter |
Oops, something went wrong.