Skip to content

update libs #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,6 @@ fabric.properties
!*/swiftpackage/.git

swiftpackage

.kotlin
.idea
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The AppAuth-Kotlin SDK is a Kotlin-first SDK for AppAuth. It's API is similar to
To install simply add to your common sourceset in the build gradle

```kotlin
implementation("dev.gitlive:appauth-kotlin:0.0.1")
implementation("dev.gitlive:appauth-kotlin:0.1.1")
```

Perform a gradle refresh and you should then be able to import the app auth files.
Expand Down
99 changes: 40 additions & 59 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

plugins {
kotlin("multiplatform") version "1.7.20"
kotlin("native.cocoapods") version "1.7.20"
kotlin("multiplatform") version "2.1.21"
kotlin("native.cocoapods") version "2.1.21"
id("com.android.library")
id("io.github.luca992.multiplatform-swiftpackage") version "2.0.5-arm64"
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
id("io.github.luca992.multiplatform-swiftpackage") version "2.2.4"
id("org.jlleitschuh.gradle.ktlint") version "12.2.0"
id("org.jetbrains.kotlinx.kover") version "0.6.1"
`maven-publish`
signing
Expand All @@ -31,72 +31,56 @@ kover {
}

kotlin {
android {
androidTarget {
publishAllLibraryVariants()
}

js(BOTH) {
js(IR) {
browser { }
}

val xcf = XCFramework()
iosSimulatorArm64 {
binaries.framework {
baseName = MODULE_NAME
xcf.add(this)
}
}
ios {
binaries.framework {
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = MODULE_NAME
xcf.add(this)
isStatic = true
}
}

sourceSets {
val commonMain by getting {
dependencies {
implementation("io.ktor:ktor-utils:2.1.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
}
commonMain.dependencies {
implementation("io.ktor:ktor-utils:3.1.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
implementation("io.github.aakira:napier:2.7.1") // or latest
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
}

commonTest.dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2")
}

val jsMain by getting
val jsTest by getting

val iosMain by getting {}
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
val iosTest by getting
val iosSimulatorArm64Test by getting
iosSimulatorArm64Test.dependsOn(iosTest)
jsMain.dependencies {}

val androidMain by getting {
dependencies {
implementation("net.openid:appauth:0.11.1")
}
}
val androidTest by getting {
dependencies {
implementation("junit:junit:4.13.2")
}
iosMain.dependencies {}


androidMain.dependencies {
implementation("net.openid:appauth:0.11.1")
}
}
}

android {
compileSdk = 31
buildToolsVersion = "30.0.3"
compileSdk = 35
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 23
targetSdk = 31
manifestPlaceholders += "appAuthRedirectScheme" to "dev.gitlive"
}
buildTypes {
Expand All @@ -109,20 +93,15 @@ android {
isIncludeAndroidResources = true
}
}
namespace = MODULE_PACKAGE_NAME
}

kotlin {
cocoapods {
ios.deploymentTarget = "7.0"
framework {
isStatic = true
}

noPodspec()
pod("AppAuth") {
source = git("https://github.com/philet/AppAuth-iOS.git") {
branch = "endsession-request-nullability"
}
}
pod("AppAuth")
}
}

Expand All @@ -135,7 +114,7 @@ multiplatformSwiftPackage {
}

ktlint {
version.set("0.43.0")
version.set("0.50.0")
}

fun SigningExtension.whenRequired(block: () -> Boolean) {
Expand All @@ -159,12 +138,14 @@ publishing {
val PUBLISH_SCM_DEVELOPERCONNECTION: String by project

repositories {
maven {
url = uri(OPEN_SOURCE_REPO)

credentials {
username = System.getenv("sonatypeUsername")
password = System.getenv("sonatypePassword")
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/yet300/AppAuth-Kotlin")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ kotlin.mpp.enableCInteropCommonization=true
signing.keyId=""
signing.password=""

gpr.user=yet300
gpr.key=todo

MODULE_PACKAGE_NAME=dev.gitlive
MODULE_VERSION_NUMBER=0.0.2
MODULE_VERSION_NUMBER=0.1.2
MODULE_NAME=appauth-kotlin

OPEN_SOURCE_REPO=https://oss.sonatype.org/service/local/staging/deploy/maven2/
Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu May 22 11:49:06 GET 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading