Fix dokka issues, some formatting
This commit is contained in:
parent
7f2fdbe477
commit
16f6a3109e
@ -23,11 +23,6 @@ buildscript {
|
|||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath ("gradle.plugin.org.jlleitschuh.gradle:ktlint-gradle:5.0.0")
|
|
||||||
classpath ("org.jetbrains.dokka:dokka-gradle-plugin:${Versions.dokkaPlugin}")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
@ -30,6 +30,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
|
||||||
implementation("com.android.tools.build:gradle:7.2.2")
|
implementation("com.android.tools.build:gradle:7.2.2")
|
||||||
|
implementation ("org.jetbrains.dokka:dokka-gradle-plugin:1.7.10")
|
||||||
}
|
}
|
||||||
|
|
||||||
System.setProperty("PROJECT_PATH", project.projectDir.parentFile.toString())
|
System.setProperty("PROJECT_PATH", project.projectDir.parentFile.toString())
|
||||||
|
@ -25,7 +25,6 @@ plugins {
|
|||||||
kotlin(PluginsDeps.multiplatform)
|
kotlin(PluginsDeps.multiplatform)
|
||||||
id(PluginsDeps.mavenPublish)
|
id(PluginsDeps.mavenPublish)
|
||||||
id(PluginsDeps.signing)
|
id(PluginsDeps.signing)
|
||||||
id(PluginsDeps.dokka)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -377,10 +377,20 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (linux32Bit.contains(this@withType.name)) {
|
if (linux32Bit.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (macos64Bit.contains(this@withType.name)) {
|
if (macos64Bit.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting macos cinterop for $this")
|
println("Setting macos cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
@ -392,7 +402,12 @@ kotlin {
|
|||||||
}
|
}
|
||||||
//All ioses share the same static library
|
//All ioses share the same static library
|
||||||
if (iosArm.contains(this@withType.name)) {
|
if (iosArm.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
@ -404,7 +419,12 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (iosSimulator.contains(this@withType.name)) {
|
if (iosSimulator.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
@ -416,7 +436,12 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tvosArm.contains(this@withType.name)) {
|
if (tvosArm.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
@ -428,7 +453,12 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tvosSimulator.contains(this@withType.name)) {
|
if (tvosSimulator.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
@ -440,7 +470,12 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (watchosArm.contains(this@withType.name)) {
|
if (watchosArm.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
@ -452,19 +487,24 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (watchosSimulator.contains(this@withType.name)) {
|
if (watchosSimulator.contains(this@withType.name)) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(
|
||||||
|
createWorkaroundNativeMainSourceSet(
|
||||||
|
this@withType.name,
|
||||||
|
nativeDependencies
|
||||||
|
)
|
||||||
|
)
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||||
compilerOpts.add("-I${projectRef.rootDir}/sodiumWrapper/static-watchos-simulators/include")
|
compilerOpts.add("-I${projectRef.rootDir}/sodiumWrapper/static-watchos-simulators/include")
|
||||||
}
|
}
|
||||||
kotlinOptions.freeCompilerArgs = listOf(
|
kotlinOptions.freeCompilerArgs = listOf(
|
||||||
"-include-binary", "${projectRef.rootDir}/sodiumWrapper/static-watchos-simulators/lib/libsodium.a"
|
"-include-binary",
|
||||||
|
"${projectRef.rootDir}/sodiumWrapper/static-watchos-simulators/lib/libsodium.a"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
compilations.getByName("test") {
|
compilations.getByName("test") {
|
||||||
println("Setting native test dep for $this@withType.name")
|
println("Setting native test dep for $this@withType.name")
|
||||||
@ -519,7 +559,6 @@ kotlin {
|
|||||||
println("Configuring Linux 64 Bit source sets")
|
println("Configuring Linux 64 Bit source sets")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
val jsMain by getting {
|
val jsMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin(Deps.Js.stdLib))
|
implementation(kotlin(Deps.Js.stdLib))
|
||||||
@ -615,15 +654,14 @@ kotlin {
|
|||||||
|
|
||||||
tasks.whenTaskAdded {
|
tasks.whenTaskAdded {
|
||||||
if ("DebugUnitTest" in name || "ReleaseUnitTest" in name) {
|
if ("DebugUnitTest" in name || "ReleaseUnitTest" in name) {
|
||||||
enabled = false // https://youtrack.jetbrains.com/issue/KT-34662 otherwise common tests fail, because we require native android libs to be loaded
|
enabled =
|
||||||
|
false // https://youtrack.jetbrains.com/issue/KT-34662 otherwise common tests fail, because we require native android libs to be loaded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create<Jar>("javadocJar") {
|
create<Jar>("javadocJar") {
|
||||||
dependsOn(dokkaHtml)
|
dependsOn(dokkaHtml)
|
||||||
archiveClassifier.set("javadoc")
|
archiveClassifier.set("javadoc")
|
||||||
@ -634,6 +672,7 @@ tasks {
|
|||||||
println("Dokka !")
|
println("Dokka !")
|
||||||
dokkaSourceSets {
|
dokkaSourceSets {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getHostOsName() == "linux" && getHostArchitecture() == "x86-64") {
|
if (getHostOsName() == "linux" && getHostArchitecture() == "x86-64") {
|
||||||
@ -665,7 +704,6 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// val legacyjsNodeTest by getting(KotlinJsTest::class) {
|
// val legacyjsNodeTest by getting(KotlinJsTest::class) {
|
||||||
//
|
//
|
||||||
// testLogging {
|
// testLogging {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user