-
-
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.
- Loading branch information
Showing
7 changed files
with
88 additions
and
96 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,103 +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 { | ||
dependsOn(jvmMain) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ fun decodeInstance(instance: JsonObject): Instance { | |
}, | ||
casURL = casURL, | ||
casToken = casToken) | ||
} | ||
} |
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 |
---|---|---|
|
@@ -82,4 +82,4 @@ class ResponseFNTest { | |
|
||
assertEquals(Json.encodeToString(rawData), response.data) | ||
} | ||
} | ||
} |
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,17 +1,18 @@ | ||
pluginManagement { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
rootProject.name = "pawnote" | ||
|
||
include(":library") |