-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for navigation lib, restructure testing setup, update to Kot…
…lin 2.0.0-RC3
- Loading branch information
Showing
21 changed files
with
241 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*.iml | ||
.gradle | ||
.kotlin | ||
/local.properties | ||
/.idea | ||
.DS_Store | ||
|
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,6 +1,4 @@ | ||
import com.android.build.gradle.LibraryExtension | ||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import org.gradle.api.JavaVersion | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
|
@@ -16,7 +14,6 @@ class KmpLibraryConventionPlugin : Plugin<Project> { | |
with(pluginManager) { | ||
apply("com.android.library") | ||
apply("org.jetbrains.kotlin.multiplatform") | ||
apply("com.vanniktech.maven.publish") | ||
} | ||
|
||
configure<KotlinMultiplatformExtension> { | ||
|
@@ -54,6 +51,19 @@ class KmpLibraryConventionPlugin : Plugin<Project> { | |
watchosX64() | ||
} | ||
|
||
val commonMain by sourceSets.commonMain | ||
val jbMain by sourceSets.creating { | ||
dependsOn(commonMain) | ||
} | ||
|
||
targets.forEach { target -> | ||
if (target.platformType !in listOf(KotlinPlatformType.androidJvm, KotlinPlatformType.common)) { | ||
target.compilations.getByName("main").defaultSourceSet { | ||
dependsOn(jbMain) | ||
} | ||
} | ||
} | ||
|
||
val commonTest by sourceSets.commonTest | ||
val jbTest by sourceSets.creating { | ||
dependsOn(commonTest) | ||
|
@@ -90,37 +100,6 @@ class KmpLibraryConventionPlugin : Plugin<Project> { | |
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
configure<MavenPublishBaseExtension> { | ||
publishToMavenCentral(SonatypeHost.DEFAULT) | ||
signAllPublications() | ||
|
||
pom { | ||
name.set("requireKTX") | ||
description.set("Kotlin utilities for easily grabbing required values") | ||
inceptionYear.set("2021") | ||
url.set("https://github.com/zsmb13/requireKTX") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("zsmb13") | ||
name.set("Márton Braun") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:github.com/zsmb13/requireKTX.git") | ||
developerConnection.set("scm:git:ssh://github.com/zsmb13/requireKTX.git") | ||
url.set("https://github.com/zsmb13/requireKTX/tree/main") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
46 changes: 46 additions & 0 deletions
46
build-logic/convention/src/main/kotlin/PublishingConventionPlugin.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,46 @@ | ||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.* | ||
|
||
class PublishingConventionPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
with(pluginManager) { | ||
apply("com.vanniktech.maven.publish") | ||
} | ||
|
||
configure<MavenPublishBaseExtension> { | ||
publishToMavenCentral(SonatypeHost.DEFAULT) | ||
signAllPublications() | ||
|
||
pom { | ||
name.set("requireKTX") | ||
description.set("Kotlin utilities for easily grabbing required values") | ||
inceptionYear.set("2021") | ||
url.set("https://github.com/zsmb13/requireKTX") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("zsmb13") | ||
name.set("Márton Braun") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:github.com/zsmb13/requireKTX.git") | ||
developerConnection.set("scm:git:ssh://github.com/zsmb13/requireKTX.git") | ||
url.set("https://github.com/zsmb13/requireKTX/tree/main") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.