ctrl k
  • convention-plugin-multiplatform/build.gradle.kts
    ■ ■ ■ ■ ■ ■
    1  -plugins {
    2  - `kotlin-dsl`
    3  -}
    4  - 
    5  -dependencies {
    6  - compileOnly(libs.kotlin.gradle.plugin)
    7  - runtimeOnly(libs.kotlin.gradle.plugin)
    8  -}
    9  - 
  • convention-plugin-multiplatform/settings.gradle.kts
    ■ ■ ■ ■ ■ ■
    1  -dependencyResolutionManagement {
    2  - repositories {
    3  - google()
    4  - mavenCentral()
    5  - }
    6  - versionCatalogs {
    7  - create("libs") {
    8  - from(files("../gradle/libs.versions.toml"))
    9  - }
    10  - }
    11  -}
    12  - 
  • convention-plugin-multiplatform/src/main/kotlin/kotlinMultiplatformConvention.gradle.kts
    ■ ■ ■ ■ ■ ■
    1  -/*
    2  - * halcyon-core
    3  - * Copyright (C) 2018 Tigase, Inc. (office@tigase.com)
    4  - *
    5  - * This program is free software: you can redistribute it and/or modify
    6  - * it under the terms of the GNU Affero General Public License as published by
    7  - * the Free Software Foundation, version 3 of the License.
    8  - *
    9  - * This program is distributed in the hope that it will be useful,
    10  - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  - * GNU Affero General Public License for more details.
    13  - *
    14  - * You should have received a copy of the GNU Affero General Public License
    15  - * along with this program. Look for COPYING file in the top folder.
    16  - * If not, see http://www.gnu.org/licenses/.
    17  - */
    18  -val libs = project.extensions.getByType<VersionCatalogsExtension>().named("libs")
    19  - 
    20  -plugins {
    21  - kotlin("multiplatform")
    22  -}
    23  - 
    24  -kotlin {
    25  - jvmToolchain(
    26  - jdkVersion = libs.findVersion("java-languageVersion").get().requiredVersion.toInt()
    27  - )
    28  - 
    29  - jvm {
    30  - withJava()
    31  - testRuns["test"].executionTask.configure {
    32  - useJUnit()
    33  - }
    34  - }
    35  - 
    36  - js(IR) {
    37  - browser {
    38  - commonWebpackConfig {
    39  - // cssSupport()
    40  - }
    41  - testTask {
    42  - useKarma {
    43  - useChromeHeadless()
    44  - }
    45  - }
    46  - binaries.executable()
    47  - }
    48  - }
    49  - 
    50  - listOf(
    51  - // iosX64(),
    52  - iosArm64(),
    53  - iosSimulatorArm64()
    54  - ).forEach {
    55  - it.binaries.framework {
    56  - // baseName = "ComposeApp"
    57  - // isStatic = true
    58  - }
    59  - }
    60  - 
    61  - sourceSets {
    62  - all {
    63  - languageSettings {
    64  - optIn("kotlin.RequiresOptIn")
    65  - }
    66  - }
    67  - 
    68  - commonMain.dependencies {
    69  - implementation(kotlin("stdlib-common"))
    70  - }
    71  - 
    72  - commonTest.dependencies {
    73  - implementation(kotlin("test"))
    74  - }
    75  - 
    76  - jvmMain.dependencies {
    77  - }
    78  - 
    79  - jvmTest.dependencies {
    80  - implementation(kotlin("test-junit"))
    81  - }
    82  - 
    83  - jsMain.dependencies {
    84  - implementation(kotlin("stdlib-js"))
    85  - }
    86  - 
    87  - jsTest.dependencies {
    88  - implementation(kotlin("test-js"))
    89  - }
    90  - 
    91  - iosMain.dependencies {
    92  - }
    93  - }
    94  -}
    95  - 
  • gradle/libs.versions.toml
    ■ ■ ■ ■ ■
    skipped 15 lines
    16 16   
    17 17  [libraries]
    18 18   
    19  -kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
    20 19  kotlin-kotlinGradlePlug = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
    21 20  kotlin-kotlinTestCommon = { group = "org.jetbrains.kotlin", name = "kotlin-test-common", version.ref = "kotlin" }
    22 21  kotlin-kotlinTestJunit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
    skipped 34 lines
  • halcyon-bouncycastle/build.gradle.kts
    ■ ■ ■ ■ ■
    skipped 15 lines
    16 16   * If not, see http://www.gnu.org/licenses/.
    17 17   */
    18 18  plugins {
    19  - id("kotlinMultiplatformConvention")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22 22   alias(libs.plugins.kotlinx.serialization)
    skipped 1 lines
    24 24   
    25 25   
    26 26  kotlin {
     27 + jvmToolchain(jdkVersion = libs.versions.java.languageVersion.get().toInt())
     28 + jvm {
     29 + withJava()
     30 + testRuns["test"].executionTask.configure {
     31 + useJUnit()
     32 + }
     33 + }
    27 34   
    28 35   sourceSets {
    29 36   named("jvmMain") {
    30 37   dependencies {
     38 + implementation(kotlin("stdlib-common"))
    31 39   implementation(project(":halcyon-core"))
    32 40   implementation(libs.bouncycastle)
    33 41   }
    skipped 3 lines
  • halcyon-core/build.gradle.kts
    ■ ■ ■ ■ ■
    skipped 15 lines
    16 16  * If not, see http://www.gnu.org/licenses/.
    17 17  */
    18 18  plugins {
    19  - id("kotlinMultiplatformConvention")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22 22   alias(libs.plugins.kotlinx.serialization)
    skipped 1 lines
    24 24  }
    25 25   
    26 26  kotlin {
    27  - 
    28  - iosArm64 {
     27 + jvmToolchain(jdkVersion = libs.versions.java.languageVersion.get().toInt())
     28 + jvm {
     29 + withJava()
     30 + testRuns["test"].executionTask.configure {
     31 + useJUnit()
     32 + }
     33 + }
     34 + js(IR) {
     35 + browser {
     36 + commonWebpackConfig { }
     37 + testTask {
     38 + useKarma {
     39 + useChromeHeadless()
     40 + }
     41 + }
     42 + binaries.executable()
     43 + }
     44 + }
     45 + iosArm64() {
    29 46   // TODO: Before compilation you need to download https://github.com/tigase/openssl-swiftpm/releases/download/1.1.171/OpenSSL.xcframework.zip to "frameworks" directory and unpack this ZIP file.
    30 47   // TODO: Before compilation it is required to go to OpenSSL.xcframework to each subdirectory and Headers and move all files there to "openssl" subdirectory inside Headers
    31 48   val openSSLFrameworkDir = "$rootDir/frameworks/OpenSSL.xcframework/ios-arm64_armv7";
    skipped 34 lines
    66 83   }
    67 84   }
    68 85   // Same target as above for iOS but for Arm64 simulator (simulator in AppleSilicon machine)
    69  - iosSimulatorArm64 {
     86 + iosSimulatorArm64() {
    70 87   val openSSLFrameworkDir = "$rootDir/frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator"
    71 88   val libsignalFrameworkDir = "$rootDir/frameworks/libsignal.xcframework/ios-arm64_x86_64-simulator"
    72 89   compilations.getByName("main") {
    skipped 33 lines
    106 123   }
    107 124   
    108 125   sourceSets {
     126 + all {
     127 + languageSettings {
     128 + optIn("kotlin.RequiresOptIn")
     129 + }
     130 + }
    109 131   val commonMain by getting {
    110 132   dependencies {
     133 + implementation(kotlin("stdlib-common"))
    111 134   implementation(libs.kotlinx.serialization.core)
    112 135   implementation(libs.kotlinx.datetime)
    113 136   implementation(libs.krypto)
    skipped 1 lines
    115 138   }
    116 139   val commonTest by getting {
    117 140   dependencies {
     141 + implementation(kotlin("test"))
    118 142   implementation(libs.kotlinx.serialization.json)
    119 143   }
    120 144   }
    skipped 12 lines
    133 157   }
    134 158   val jvmTest by getting {
    135 159   dependsOn(omemoTest)
     160 + dependencies {
     161 + implementation(kotlin("test-junit"))
     162 + }
    136 163   }
    137 164   val jsMain by getting {
    138 165   dependsOn(commonMain)
     166 + dependencies {
     167 + implementation(kotlin("stdlib-js"))
     168 + }
    139 169   }
    140 170   val jsTest by getting {
    141 171   dependsOn(commonTest)
     172 + dependencies {
     173 + implementation(kotlin("test-js"))
     174 + }
    142 175   }
    143  - val iosMain by getting {
     176 + val iosMain by creating {
    144 177   dependsOn(omemoMain)
    145 178   dependencies {
    146 179   implementation(libs.kotlinx.datetime)
    skipped 76 lines
  • halcyon-coroutines/build.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 15 lines
    16 16   * If not, see http://www.gnu.org/licenses/.
    17 17   */
    18 18  plugins {
    19  - id("kotlinMultiplatformConvention")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22 22  }
    23 23   
    24 24  kotlin {
    25  - 
     25 + jvmToolchain(jdkVersion = libs.versions.java.languageVersion.get().toInt())
     26 + jvm {
     27 + withJava()
     28 + testRuns["test"].executionTask.configure {
     29 + useJUnit()
     30 + }
     31 + }
     32 + js(IR) {
     33 + browser {
     34 + commonWebpackConfig {
     35 +// cssSupport()
     36 + }
     37 + testTask {
     38 + useKarma {
     39 + useChromeHeadless()
     40 + }
     41 + }
     42 + }
     43 + }
     44 + iosArm64 {}
     45 + iosSimulatorArm64 {}
    26 46   sourceSets {
    27 47   named("commonMain") {
    28 48   dependencies {
     49 + implementation(kotlin("stdlib-common"))
    29 50   implementation(project(":halcyon-core"))
    30 51   implementation(libs.kotlinx.coroutines.core)
    31 52   }
    32 53   }
    33 54   named("commonTest") {
    34 55   dependencies {
     56 + implementation(kotlin("test"))
    35 57   implementation(libs.kotlinx.coroutines.test)
    36 58   }
    37 59   }
    skipped 2 lines
  • halcyon-rx/build.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 15 lines
    16 16   * If not, see http://www.gnu.org/licenses/.
    17 17   */
    18 18  plugins {
    19  - id("kotlinMultiplatformConvention")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22 22   alias(libs.plugins.kotlinx.serialization)
    skipped 1 lines
    24 24   
    25 25   
    26 26  kotlin {
    27  - 
     27 + jvmToolchain(jdkVersion = libs.versions.java.languageVersion.get().toInt())
     28 + jvm {
     29 + withJava()
     30 + testRuns["test"].executionTask.configure {
     31 + useJUnit()
     32 + }
     33 + }
     34 + js(IR) {
     35 + browser {
     36 + commonWebpackConfig {
     37 +// cssSupport.enabled = true
     38 + }
     39 + testTask {
     40 + useKarma {
     41 + useChromeHeadless()
     42 + }
     43 + }
     44 + }
     45 + }
     46 + iosArm64 {}
     47 + iosSimulatorArm64 {}
    28 48   sourceSets {
    29 49   named("commonMain") {
    30 50   dependencies {
     51 + implementation(kotlin("stdlib-common"))
    31 52   implementation(project(":halcyon-core"))
    32 53   implementation(libs.reactive.reaktive)
    33 54   }
    34 55   }
    35 56   named("commonTest") {
    36 57   dependencies {
     58 + implementation(kotlin("test"))
    37 59   implementation(libs.reactive.testing)
    38 60   }
    39 61   }
    skipped 2 lines
  • settings.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 18 lines
    19 19   
    20 20  include(
    21 21   ":docs",
    22  - ":halcyon-bouncycastle",
    23 22   ":halcyon-core",
    24  - ":halcyon-coroutines",
    25  - ":halcyon-rx",
    26  -// ":integration-tests",
     23 + "halcyon-rx",
     24 + "halcyon-coroutines",
     25 + "halcyon-bouncycastle",
     26 +// "integration-tests",
    27 27  )
    28 28   
    29 29  pluginManagement {
    30  - includeBuild("convention-plugin-multiplatform")
    31 30   repositories {
    32 31   gradlePluginPortal()
    33 32   mavenCentral()
    skipped 11 lines
Page is in error, reload to recover