From d69d5842004e1a9cd774ab47c9c894b11bf56287 Mon Sep 17 00:00:00 2001 From: marcprux Date: Sat, 19 Aug 2023 22:49:21 -0400 Subject: [PATCH] --- Package.swift | 4 +-- Sources/SkipLibKt/Skip/skip.yml | 56 --------------------------------- 2 files changed, 2 insertions(+), 58 deletions(-) diff --git a/Package.swift b/Package.swift index 0935fce..5aedc64 100644 --- a/Package.swift +++ b/Package.swift @@ -15,8 +15,8 @@ let package = Package( ], targets: [ .target(name: "SkipLib", plugins: [.plugin(name: "preflight", package: "skip")]), - .target(name: "SkipLibKt", dependencies: ["SkipLib"], resources: [.process("Skip")], plugins: [.plugin(name: "transpile", package: "skip")]), + .target(name: "SkipLibKt", dependencies: ["SkipLib", .product(name: "SkipUnitKt", package: "skip-unit")], resources: [.process("Skip")], plugins: [.plugin(name: "transpile", package: "skip")]), .testTarget(name: "SkipLibTests", dependencies: ["SkipLib"], plugins: [.plugin(name: "preflight", package: "skip")]), - .testTarget(name: "SkipLibKtTests", dependencies: ["SkipLibKt", .product(name: "SkipUnitKt", package: "skip-unit")], resources: [.process("Skip")], plugins: [.plugin(name: "transpile", package: "skip")]), + .testTarget(name: "SkipLibKtTests", dependencies: ["SkipLibKt", .product(name: "SkipUnit", package: "skip-unit")], resources: [.process("Skip")], plugins: [.plugin(name: "transpile", package: "skip")]), ] ) diff --git a/Sources/SkipLibKt/Skip/skip.yml b/Sources/SkipLibKt/Skip/skip.yml index 69613b5..ad3467b 100644 --- a/Sources/SkipLibKt/Skip/skip.yml +++ b/Sources/SkipLibKt/Skip/skip.yml @@ -6,65 +6,9 @@ # the blocks to add to the build.gradle.kts build: contents: - - block: 'plugins' - contents: - - 'kotlin("android") version "1.9.0"' - - 'id("com.android.library") version "8.1.0"' - block: 'dependencies' contents: - # kotlin-bom specifies the default version of any subsequent Kotlin dependencies - 'implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.0"))' - - 'implementation("org.jetbrains.kotlin:kotlin-reflect")' - - 'implementation("org.jetbrains.kotlin:kotlin-test")' - - 'implementation("org.jetbrains.kotlin:kotlin-test-junit")' - 'implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")' - 'implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")' - 'testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")' - - 'testImplementation("org.jetbrains.kotlin:kotlin-test-junit")' - - 'testImplementation("androidx.test:core:1.5.0")' - - 'testImplementation("androidx.test.ext:junit:1.1.5")' - - 'testImplementation("org.robolectric:robolectric:4.10.3")' - - - block: 'kotlin' - contents: - - 'jvmToolchain(17)' - - - block: 'android' - contents: - - 'namespace = group as String' - - 'compileSdk = 34' - - block: 'defaultConfig' - contents: - - 'minSdk = 28' - - 'testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"' - - block: 'compileOptions' - contents: - - 'sourceCompatibility = JavaVersion.VERSION_17' - - 'targetCompatibility = JavaVersion.VERSION_17' - - block: 'kotlinOptions' - contents: - - 'jvmTarget = "17"' - - - block: 'testOptions' - contents: - - 'unitTests.isIncludeAndroidResources = true' - - - block: 'sourceSets' - contents: - - 'getByName("main").java.srcDirs("src/main/kotlin")' - - 'getByName("test").java.srcDirs("src/test/kotlin")' - # Causes "Duplicate Content Roots Detected" and failure to run tests in Android studio - #- 'getByName("androidTest").java.srcDirs("src/test/kotlin")' - - - block: 'tasks.withType()' - contents: - - block: 'kotlinOptions' - contents: - - 'suppressWarnings = true' - - - block: 'tasks.withType().configureEach' - contents: - - 'systemProperties.put("robolectric.logging", "stdout")' - - block: 'testLogging' - contents: - - 'this.showStandardStreams = true'