-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge pull request #66 from Skythrew/kotlin
Clean everything up (Kotlin implementation)
- Loading branch information
Showing
13 changed files
with
87 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
plugins { | ||
alias(libs.plugins.androidLibrary).apply(false) | ||
alias(libs.plugins.kotlinMultiplatform).apply(false) | ||
alias(libs.plugins.androidLibrary).apply(false) | ||
alias(libs.plugins.kotlinMultiplatform).apply(false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,94 @@ | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
val libraryName = "Pawnote" | ||
|
||
version = "0.0.0" | ||
|
||
plugins { | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
id("com.vanniktech.maven.publish") version "0.29.0" | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
id("com.vanniktech.maven.publish") version "0.29.0" | ||
} | ||
|
||
kotlin { | ||
jvm() | ||
androidTarget { | ||
publishLibraryVariants("release") | ||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
compilerOptions { | ||
jvmTarget.set(JvmTarget.JVM_1_8) | ||
} | ||
jvm() | ||
androidTarget { | ||
publishLibraryVariants("release") | ||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
compilerOptions { jvmTarget.set(JvmTarget.JVM_1_8) } | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(libs.ktor.client.core) | ||
implementation(libs.ktor.client.okhttp) | ||
|
||
implementation(libs.kotlinx.serialization.json) | ||
implementation(libs.kotlinx.serialization.core) | ||
|
||
implementation(libs.kotlinx.datetime) | ||
} | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(libs.ktor.client.core) | ||
implementation(libs.ktor.client.okhttp) | ||
|
||
implementation(libs.kotlinx.serialization.json) | ||
implementation(libs.kotlinx.serialization.core) | ||
|
||
implementation(libs.kotlinx.datetime) | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(libs.kotlin.test) | ||
} | ||
} | ||
val jvmMain by getting { | ||
dependencies { | ||
implementation(libs.ktor.client.okhttp) | ||
implementation(libs.kotlin.test) | ||
} | ||
} | ||
val androidMain by getting { | ||
dependencies { | ||
implementation(libs.ktor.client.okhttp) | ||
} | ||
} | ||
val commonTest by getting { dependencies { implementation(libs.kotlin.test) } } | ||
val jvmMain by getting { | ||
dependencies { | ||
implementation(libs.ktor.client.okhttp) | ||
implementation(libs.kotlin.test) | ||
} | ||
} | ||
val androidMain by getting { | ||
dependsOn(jvmMain) | ||
dependencies { implementation(libs.ktor.client.okhttp) } | ||
} | ||
} | ||
} | ||
|
||
val groupName = "ink.literate" | ||
val idLibraryName = libraryName.lowercase() | ||
|
||
group = groupName | ||
|
||
android { | ||
namespace = groupName | ||
compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
defaultConfig { | ||
minSdk = libs.versions.android.minSdk.get().toInt() | ||
} | ||
namespace = groupName | ||
compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() } | ||
} | ||
|
||
|
||
mavenPublishing { | ||
coordinates(groupName, idLibraryName, version.toString()) | ||
|
||
pom { | ||
name = libraryName | ||
description = "A purrfect API wrapper for PRONOTE." | ||
inceptionYear = "2024" | ||
|
||
url = "https://docs.literate.ink/$idLibraryName" | ||
|
||
licenses { | ||
license { | ||
name.set("GPL-3.0-or-later") | ||
url.set("https://www.gnu.org/licenses/gpl-3.0.txt") | ||
distribution.set("https://www.gnu.org/licenses/gpl-3.0.txt") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
organization = "LiterateInk" | ||
organizationUrl = "https://literate.ink" | ||
} | ||
} | ||
|
||
scm { | ||
url = "https://github.com/LiterateInk/$libraryName" | ||
connection = "scm:git:https://github.com/LiterateInk/$libraryName.git" | ||
developerConnection = "scm:git:https://github.com/LiterateInk/$libraryName.git" | ||
} | ||
coordinates(groupName, idLibraryName, version.toString()) | ||
|
||
pom { | ||
name = libraryName | ||
description = "A purrfect API wrapper for PRONOTE." | ||
inceptionYear = "2024" | ||
|
||
url = "https://docs.literate.ink/$idLibraryName" | ||
|
||
licenses { | ||
license { | ||
name.set("GPL-3.0-or-later") | ||
url.set("https://www.gnu.org/licenses/gpl-3.0.txt") | ||
distribution.set("https://www.gnu.org/licenses/gpl-3.0.txt") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
organization = "LiterateInk" | ||
organizationUrl = "https://literate.ink" | ||
} | ||
} | ||
|
||
scm { | ||
url = "https://github.com/LiterateInk/$libraryName" | ||
connection = "scm:git:https://github.com/LiterateInk/$libraryName.git" | ||
developerConnection = "scm:git:https://github.com/LiterateInk/$libraryName.git" | ||
} | ||
} | ||
|
||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true) | ||
signAllPublications() | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true) | ||
signAllPublications() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
library/src/commonTest/kotlin/ink/literate/pawnote/GeolocationTest.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
library/src/commonTest/kotlin/ink/literate/pawnote/api/Instance.kt
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
library/src/commonTest/kotlin/ink/literate/pawnote/api/identify.kt
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
library/src/commonTest/kotlin/ink/literate/pawnote/api/private/instance-parameters.kt
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
library/src/commonTest/kotlin/ink/literate/pawnote/api/session-information.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
library/src/commonTest/kotlin/ink/literate/pawnote/login.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.