Skip to content

Commit de6ba9d

Browse files
committed
Update the buildscript and add all needed dependencies
1 parent e8b09e0 commit de6ba9d

File tree

4 files changed

+78
-12
lines changed

4 files changed

+78
-12
lines changed

README.MD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# KPasteBin [![Maven Central](https://img.shields.io/maven-central/v/net.pearx.kpastebin/kpastebin.svg?label=version&logo=kotlin&logoColor=white)](https://search.maven.org/search?q=g:%22net.pearx.kpastebin%22%20AND%20a:%22kpastebin%22) [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
2-
[![License](https://img.shields.io/github/license/pearxteam/kpastebin.svg)](https://raw.githubusercontent.com/pearxteam/kpastebin/master/LICENSE.TXT)
1+
# KPastebin [![Maven Central](https://img.shields.io/maven-central/v/net.pearx.kpastebin/kpastebin.svg?label=version&logo=kotlin&logoColor=white)](https://search.maven.org/search?q=g:%22net.pearx.kpastebin%22%20AND%20a:%22kpastebin%22) [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
2+
[![License](https://img.shiel**ds.io/github/license/pearxteam/kpastebin.svg)](https://raw.githubusercontent.com/pearxteam/kpastebin/master/LICENSE.TXT)
33
[![Discord](https://img.shields.io/discord/136085738151346176.svg?logo=discord&logoColor=white)](https://discord.gg/q9cX9QE)
44
![Test & Deploy | develop](https://github.com/pearxteam/kpastebin/workflows/Test%20&%20Deploy%20%7C%20develop/badge.svg?branch=develop)
55
![Test & Deploy | master](https://github.com/pearxteam/kpastebin/workflows/Test%20&%20Deploy%20%7C%20master/badge.svg?branch=master)

build.gradle.kts

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
import com.github.breadmoirai.githubreleaseplugin.GithubReleaseExtension
22
import net.pearx.multigradle.util.MultiGradleExtension
3+
import net.pearx.multigradle.util.kotlinMpp
34

45
val projectChangelog: String by project
56
val projectDescription: String by project
67

8+
val ktorVersion: String by project
9+
val xmlutilVersion: String by project
10+
val kotlinxSerializationVersion: String by project
11+
712
val pearxRepoUsername: String? by project
813
val pearxRepoPassword: String? by project
914
val sonatypeOssUsername: String? by project
1015
val sonatypeOssPassword: String? by project
1116
val githubAccessToken: String? by project
1217
val devBuildNumber: String? by project
1318

19+
1420
plugins {
1521
id("net.pearx.multigradle.simple.project")
16-
id("org.jetbrains.kotlin.multiplatform") apply (false)
22+
kotlin("multiplatform") apply (false)
23+
kotlin("plugin.serialization")
1724
id("com.github.breadmoirai.github-release")
1825
`maven-publish`
1926
signing
@@ -28,6 +35,62 @@ configure<MultiGradleExtension> {
2835
}
2936
}
3037

38+
repositories {
39+
maven {
40+
url = uri("https://dl.bintray.com/pdvrieze/maven")
41+
}
42+
}
43+
44+
kotlinMpp {
45+
explicitApi()
46+
47+
sourceSets {
48+
val commonMain by getting {
49+
dependencies {
50+
implementation("io.ktor:ktor-client-core:$ktorVersion")
51+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinxSerializationVersion")
52+
implementation("net.devrieze:xmlutil-serialization:$xmlutilVersion")
53+
}
54+
}
55+
56+
val androidMain by getting {
57+
dependencies {
58+
implementation("io.ktor:ktor-client-android:$ktorVersion")
59+
}
60+
}
61+
62+
val jvmMain by getting {
63+
dependencies {
64+
implementation("io.ktor:ktor-client-cio:$ktorVersion")
65+
}
66+
}
67+
68+
val jsMain by getting {
69+
dependencies {
70+
implementation("io.ktor:ktor-client-js:$ktorVersion")
71+
}
72+
}
73+
74+
val posixMain by getting {
75+
dependencies {
76+
implementation("io.ktor:ktor-client-curl:$ktorVersion")
77+
}
78+
}
79+
80+
val appleMobileMain by getting {
81+
dependencies {
82+
implementation("io.ktor:ktor-client-ios:$ktorVersion")
83+
}
84+
}
85+
86+
val jvmTest by getting {
87+
dependencies {
88+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8")
89+
}
90+
}
91+
}
92+
}
93+
3194
configure<PublishingExtension> {
3295
publications.withType<MavenPublication> {
3396
pom {

gradle.properties

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
enabledPlatforms=js,jvm,android,linuxX64,tvos*,ios*,watchos*,macos*,mingwX64
2+
13
org.gradle.jvmargs=-Xmx1G
24
# https://github.com/gradle/gradle/issues/11308
35
systemProp.org.gradle.internal.publish.checksums.insecure=true
@@ -6,9 +8,9 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
68
projectVersion=0.0.0
79
projectChangelog=
810
projectDescription=Multiplatform Kotlin library to interact with the pastebin.com API.
9-
kotlinVersion=1.3.72
11+
kotlinVersion=1.4.0
1012
githubReleaseVersion=2.2.12
11-
multigradleVersion=1.8.3
13+
multigradleVersion=1.9.0
1214

1315
#JS Stuff
1416
nodeJsVersion=14.8.0
@@ -24,4 +26,9 @@ jacocoVersion=0.8.5
2426
#Android Stuff
2527
buildToolsVersion=29.0.3
2628
compileSdkVersion=android-29
27-
junitVersion=4.13
29+
junitVersion=4.13
30+
31+
#Dependencies
32+
ktorVersion=1.4.0
33+
xmlutilVersion=0.20.0.1
34+
kotlinxSerializationVersion=1.0.0-rc

settings.gradle.kts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ pluginManagement {
66
val githubReleaseVersion: String by settings
77

88
plugins {
9-
id("org.jetbrains.kotlin.multiplatform") version kotlinVersion
9+
kotlin("multiplatform") version kotlinVersion
10+
kotlin("plugin.serialization") version kotlinVersion
1011
id("net.pearx.multigradle.simple.project") version multigradleVersion
1112
id("net.pearx.multigradle.simple.settings") version multigradleVersion
1213
id("com.github.breadmoirai.github-release") version githubReleaseVersion
1314
}
14-
15-
repositories {
16-
mavenLocal()
17-
gradlePluginPortal()
18-
}
1915
}
2016

2117
plugins {

0 commit comments

Comments
 (0)