Fix dokka issues, some formatting

This commit is contained in:
Ugljesa Jovanovic 2022-08-29 09:31:39 +02:00
parent 7f2fdbe477
commit 16f6a3109e
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F
4 changed files with 55 additions and 22 deletions

View File

@ -23,11 +23,6 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath ("gradle.plugin.org.jlleitschuh.gradle:ktlint-gradle:5.0.0")
classpath ("org.jetbrains.dokka:dokka-gradle-plugin:${Versions.dokkaPlugin}")
}
}
allprojects {

View File

@ -30,6 +30,7 @@ repositories {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
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())

View File

@ -25,7 +25,6 @@ plugins {
kotlin(PluginsDeps.multiplatform)
id(PluginsDeps.mavenPublish)
id(PluginsDeps.signing)
id(PluginsDeps.dokka)
}
repositories {

View File

@ -377,10 +377,20 @@ kotlin {
}
}
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)) {
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
defaultSourceSet.dependsOn(
createWorkaroundNativeMainSourceSet(
this@withType.name,
nativeDependencies
)
)
println("Setting macos cinterop for $this")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
@ -392,7 +402,12 @@ kotlin {
}
//All ioses share the same static library
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")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
@ -404,7 +419,12 @@ kotlin {
}
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")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
@ -416,7 +436,12 @@ kotlin {
}
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")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
@ -428,7 +453,12 @@ kotlin {
}
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")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
@ -440,7 +470,12 @@ kotlin {
}
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")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
@ -452,19 +487,24 @@ kotlin {
}
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")
val libsodiumCinterop by cinterops.creating {
defFile(projectRef.file("src/nativeInterop/cinterop/libsodium.def"))
compilerOpts.add("-I${projectRef.rootDir}/sodiumWrapper/static-watchos-simulators/include")
}
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") {
println("Setting native test dep for $this@withType.name")
@ -519,7 +559,6 @@ kotlin {
println("Configuring Linux 64 Bit source sets")
val jsMain by getting {
dependencies {
implementation(kotlin(Deps.Js.stdLib))
@ -615,15 +654,14 @@ kotlin {
tasks.whenTaskAdded {
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 {
create<Jar>("javadocJar") {
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
@ -634,6 +672,7 @@ tasks {
println("Dokka !")
dokkaSourceSets {
}
}
if (getHostOsName() == "linux" && getHostArchitecture() == "x86-64") {
@ -665,7 +704,6 @@ tasks {
}
// val legacyjsNodeTest by getting(KotlinJsTest::class) {
//
// testLogging {