|
| 1 | +plugins { |
| 2 | + alias(libs.plugins.kotlinMultiplatform) |
| 3 | + alias(libs.plugins.kotlinSerialization) |
| 4 | + alias(libs.plugins.mavenPublish) |
| 5 | + alias(libs.plugins.dokka) |
| 6 | + signing |
| 7 | +} |
| 8 | + |
| 9 | +group = "net.avianlabs.solana" |
| 10 | +version = properties["version"] as String |
| 11 | + |
| 12 | + |
| 13 | +kotlin { |
| 14 | + applyDefaultHierarchyTemplate() |
| 15 | + explicitApi() |
| 16 | + |
| 17 | + jvm { |
| 18 | + // set the target JVM version |
| 19 | + compilations.all { |
| 20 | + kotlinOptions { |
| 21 | + jvmTarget = "17" |
| 22 | + } |
| 23 | + } |
| 24 | + } |
| 25 | + |
| 26 | + mingwX64() |
| 27 | + linuxX64() |
| 28 | + |
| 29 | + sourceSets { |
| 30 | + val jvmMain by getting |
| 31 | + |
| 32 | + val jvmTest by getting |
| 33 | + |
| 34 | + val commonMain by getting { |
| 35 | + dependencies { |
| 36 | + api(project(":solana-kotlin")) |
| 37 | + implementation(libs.coroutinesCore) |
| 38 | + implementation(libs.kermit) |
| 39 | + implementation(libs.arrow.core) |
| 40 | + } |
| 41 | + } |
| 42 | + val commonTest by getting { |
| 43 | + dependencies { |
| 44 | + implementation(libs.kotlinTest) |
| 45 | + implementation(libs.coroutinesTest) |
| 46 | + } |
| 47 | + } |
| 48 | + |
| 49 | + val nativeMain by getting |
| 50 | + |
| 51 | + val linuxMain by getting |
| 52 | + |
| 53 | + val mingwMain by getting |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { |
| 58 | + kotlinOptions { |
| 59 | + jvmTarget = "17" |
| 60 | + } |
| 61 | +} |
| 62 | + |
| 63 | +signing { |
| 64 | + useGpgCmd() |
| 65 | +} |
| 66 | + |
| 67 | +publishing { |
| 68 | + repositories { |
| 69 | + mavenLocal() |
| 70 | + repositories { |
| 71 | + maven { |
| 72 | + name = "GitHubPackages" |
| 73 | + url = uri("https://maven.pkg.github.com/avianlabs/solana-kotlin") |
| 74 | + credentials { |
| 75 | + username = System.getenv("GITHUB_ACTOR") |
| 76 | + password = System.getenv("GITHUB_TOKEN") |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + publications { |
| 82 | + withType<MavenPublication> { |
| 83 | + pom { |
| 84 | + name = "Solana Kotlin Arrow Extensions" |
| 85 | + description = "Arrow extensions for Solana Kotlin" |
| 86 | + licenses { |
| 87 | + license { |
| 88 | + name = "MIT" |
| 89 | + url = "https://opensource.org/licenses/MIT" |
| 90 | + } |
| 91 | + } |
| 92 | + url = "https://github.com/avianlabs/solana-kotlin" |
| 93 | + issueManagement { |
| 94 | + system = "GitHub" |
| 95 | + url = "https://github.com/avianlabs/solana-kotlin" |
| 96 | + } |
| 97 | + scm { |
| 98 | + connection = "https://github.com/avianlabs/solana-kotlin.git" |
| 99 | + url = "https://github.com/avianlabs/solana-kotlin" |
| 100 | + } |
| 101 | + developers { |
| 102 | + developer { |
| 103 | + name = "Avian Labs Engineers" |
| 104 | + |
| 105 | + } |
| 106 | + } |
| 107 | + } |
| 108 | + } |
| 109 | + } |
| 110 | +} |
| 111 | + |
| 112 | +mavenPublishing { |
| 113 | + if (rootProject.findProperty("signPublications") != "false") { |
| 114 | + signAllPublications() |
| 115 | + } |
| 116 | +} |
0 commit comments