Skip to content

Commit

Permalink
Merge pull request #55 from mirzemehdi/rel_v2.1.0
Browse files Browse the repository at this point in the history
Release v2.1.0
  • Loading branch information
mirzemehdi authored Oct 6, 2024
2 parents 2d8c62b + 4fced37 commit 9951e5d
Show file tree
Hide file tree
Showing 50 changed files with 1,175 additions and 151 deletions.
77 changes: 18 additions & 59 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
distribution: 'temurin'

- name: Setup gradle
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1

- name: Check api
run: ./gradlew apiCheck
Expand All @@ -59,7 +59,7 @@ jobs:
distribution: 'temurin'

- name: Setup gradle
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1

- name: Test ${{ matrix.config.target }} targets
continue-on-error: ${{ matrix.config.continueOnError }}
Expand All @@ -84,7 +84,7 @@ jobs:
distribution: 'temurin'

- name: Setup gradle
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1

- name: Setup Pages
uses: actions/configure-pages@v3
Expand All @@ -101,73 +101,32 @@ jobs:
id: deployment
uses: actions/deploy-pages@v1

- name: Create new release from tag
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
token: ${{ env.github_token }}


create-staging-repository:
runs-on: ubuntu-latest
name: Create staging repository
needs: release
outputs:
repository_id: ${{ steps.create.outputs.repository_id }}
steps:
- id: create
uses: nexus-actions/[email protected]
with:
username: mirzemehdi
password: ${{ secrets.SONATYPE_PASSWORD }}
staging_profile_id: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
description: Created by GitHub Actions
base_url: https://s01.oss.sonatype.org/service/local/

publish:
name: Publish to Maven
runs-on: macos-latest
needs: create-staging-repository
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup gradle
uses: gradle/[email protected]

- name: Write secrets to local.properties
run: |
echo sonatypeUsername="${SONATYPE_USERNAME}" >> "local.properties"
echo sonatypePassword="${SONATYPE_PASSWORD}" >> "local.properties"
echo gpgKeyPassword="${GPG_KEY_PASSWORD}" >> "local.properties"
echo gpgKeySecret="${GPG_KEY_SECRET}" >> "local.properties"
env:
SONATYPE_REPOSITORY_ID: ${{ needs.create-staging-repository.outputs.repository_id }}
SONATYPE_USERNAME: mirzemehdi
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}
GPG_KEY_SECRET: ${{ secrets.GPG_KEY_SECRET }}

- name: Release to sonatype
run: ./gradlew publishAllPublicationsToMavenRepository

close-staging-repository:
name: Close staging repository
runs-on: ubuntu-latest
needs: [ create-staging-repository, publish ]
if: ${{ always() && needs.create-staging-repository.result == 'success' }}
steps:
- name: Close staging repository
uses: nexus-actions/release-nexus-staging-repo@6632a81bfab63557b2717e8423b0a620ae5aa414
- name: Publish to sonatype
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1
with:
username: mirzemehdi
password: ${{ secrets.SONATYPE_PASSWORD }}
staging_repository_id: ${{ needs.create-staging-repository.outputs.repository_id }}
base_url: https://s01.oss.sonatype.org/service/local/
arguments: |
publishToSonatype
closeAndReleaseSonatypeStagingRepository
- name: Create new release from tag
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
token: ${{ env.github_token }}


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# KMPAuth - Kotlin Multiplatform Authentication Library
[![Build](https://github.com/mirzemehdi/KMPAuth/actions/workflows/build_and_publish.yml/badge.svg)](https://github.com/mirzemehdi/KMPAuth/actions/workflows/build_and_publish.yml)
[![Kotlin](https://img.shields.io/badge/Kotlin-2.0.0-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/Kotlin-2.0.20-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.mirzemehdi/kmpauth-google?color=blue)](https://search.maven.org/search?q=g:io.github.mirzemehdi+kmpauth)

![badge-android](http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat)
Expand Down
41 changes: 17 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ plugins {
alias(libs.plugins.dokka) apply false
alias(libs.plugins.googleServices) apply false
alias(libs.plugins.kotlinx.binary.validator)
alias(libs.plugins.nexusPublish)
}


Expand All @@ -21,38 +22,18 @@ plugins {
allprojects {
group = "io.github.mirzemehdi"
version = project.properties["kmpAuthVersion"] as String
val sonatypeUsername = gradleLocalProperties(rootDir).getProperty("sonatypeUsername")
val sonatypePassword = gradleLocalProperties(rootDir).getProperty("sonatypePassword")
val gpgKeySecret = gradleLocalProperties(rootDir).getProperty("gpgKeySecret")
val gpgKeyPassword = gradleLocalProperties(rootDir).getProperty("gpgKeyPassword")

val gpgKeySecret = gradleLocalProperties(rootDir, providers).getProperty("gpgKeySecret")
val gpgKeyPassword = gradleLocalProperties(rootDir, providers).getProperty("gpgKeyPassword")

val excludedModules = listOf(":sampleApp:composeApp",":sampleApp")
val excludedModules = listOf(":sampleApp:composeApp", ":sampleApp")
if (project.path in excludedModules) return@allprojects

apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
apply(plugin = "signing")


extensions.configure<PublishingExtension> {
repositories {
maven {
val isSnapshot = version.toString().endsWith("SNAPSHOT")
val repositoryId = System.getenv("SONATYPE_REPOSITORY_ID") ?: ""
url = uri(
when{
isSnapshot.not() && repositoryId.isNotEmpty() -> "https://s01.oss.sonatype.org/service/local/staging/deployByRepositoryId/${repositoryId}/"
isSnapshot.not() -> "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
else -> "https://s01.oss.sonatype.org/content/repositories/snapshots"
}
)
credentials {
username = sonatypeUsername
password = sonatypePassword
}
}
}

val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(tasks.getByName<DokkaTask>("dokkaHtml"))
archiveClassifier.set("javadoc")
Expand Down Expand Up @@ -103,5 +84,17 @@ allprojects {
dependsOn(project.tasks.withType(Sign::class.java))
}
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
val sonatypeUsername = gradleLocalProperties(rootDir, providers).getProperty("sonatypeUsername")
val sonatypePassword = gradleLocalProperties(rootDir, providers).getProperty("sonatypePassword")
username = sonatypeUsername
password = sonatypePassword
}
}
}


4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\=

#Compose
org.jetbrains.compose.experimental.uikit.enabled=true
org.jetbrains.compose.experimental.wasm.enabled=true
org.jetbrains.compose.experimental.jscanvas.enabled=true

#Android
android.useAndroidX=true
Expand All @@ -18,4 +20,4 @@ kotlin.mpp.enableCInteropCommonization=true
#Development
development=true

kmpAuthVersion=2.0.0
kmpAuthVersion=2.1.0
28 changes: 15 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
[versions]
compose = "1.6.7"
compose-plugin = "1.6.10"
agp = "8.1.4"
compose = "1.7.3"
compose-plugin = "1.6.11"
agp = "8.5.2"
android-minSdk = "24"
android-compileSdk = "34"
android-targetSdk = "34"
androidx-activityCompose = "1.9.0"
androidx-activityCompose = "1.9.2"
androidx-core-ktx = "1.13.1"
androidx-appcompat = "1.7.0"
androidx-material = "1.12.0"
androidx-constraintlayout = "2.1.4"
androidx-test-junit = "1.1.5"
androidx-espresso-core = "3.5.1"
androidx-startup-runtime = "1.1.1"
kotlin = "2.0.0"
androidx-test-junit = "1.2.1"
androidx-espresso-core = "3.6.1"
androidx-startup-runtime = "1.2.0"
kotlin = "2.0.20"
junit = "4.13.2"
koin = "3.5.6"
koin = "4.0.0"
kotlinx-binary-validator = "0.13.2"
dokka = "1.9.10"
androidxCredential = "1.3.0-beta01"
googleIdIdentity = "1.1.0"
koinCompose = "1.1.5"
androidxCredential = "1.3.0"
googleIdIdentity = "1.1.1"
koinCompose = "4.0.0"
googleServices = "4.4.2"
firebaseGitLiveAuth = "1.12.0"
firebaseGitLiveAuth = "2.1.0"
androidLegacyPlayServices = "21.2.0"
nexusPublish = "2.0.0"


[libraries]
Expand Down Expand Up @@ -69,3 +70,4 @@ kotlinNativeCocoaPods = { id = "org.jetbrains.kotlin.native.cocoapods", version.
kotlinx-binary-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-binary-validator" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" }
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexusPublish" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
28 changes: 28 additions & 0 deletions kmpauth-core/api/android/kmpauth-core.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
public final class com/mmk/kmpauth/core/Extensions_androidKt {
public static final fun getActivity (Landroid/content/Context;)Landroidx/activity/ComponentActivity;
}

public abstract interface annotation class com/mmk/kmpauth/core/KMPAuthInternalApi : java/lang/annotation/Annotation {
}

public abstract interface class com/mmk/kmpauth/core/UiContainerScope {
public abstract fun onClick ()V
}

public abstract class com/mmk/kmpauth/core/di/KMPKoinComponent : org/koin/core/component/KoinComponent {
public fun <init> ()V
public fun getKoin ()Lorg/koin/core/Koin;
}

public final class com/mmk/kmpauth/core/di/LibDependencyInitializer {
public static final field INSTANCE Lcom/mmk/kmpauth/core/di/LibDependencyInitializer;
public final fun getKoinApp ()Lorg/koin/core/KoinApplication;
public final fun initialize (Ljava/util/List;)V
public final fun initialize (Lorg/koin/core/module/Module;)V
public static synthetic fun initialize$default (Lcom/mmk/kmpauth/core/di/LibDependencyInitializer;Ljava/util/List;ILjava/lang/Object;)V
}

public final class com/mmk/kmpauth/core/di/PlatformModule_androidKt {
public static final fun isAndroidPlatform ()Z
}

24 changes: 24 additions & 0 deletions kmpauth-core/api/jvm/kmpauth-core.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
public abstract interface annotation class com/mmk/kmpauth/core/KMPAuthInternalApi : java/lang/annotation/Annotation {
}

public abstract interface class com/mmk/kmpauth/core/UiContainerScope {
public abstract fun onClick ()V
}

public abstract class com/mmk/kmpauth/core/di/KMPKoinComponent : org/koin/core/component/KoinComponent {
public fun <init> ()V
public fun getKoin ()Lorg/koin/core/Koin;
}

public final class com/mmk/kmpauth/core/di/LibDependencyInitializer {
public static final field INSTANCE Lcom/mmk/kmpauth/core/di/LibDependencyInitializer;
public final fun getKoinApp ()Lorg/koin/core/KoinApplication;
public final fun initialize (Ljava/util/List;)V
public final fun initialize (Lorg/koin/core/module/Module;)V
public static synthetic fun initialize$default (Lcom/mmk/kmpauth/core/di/LibDependencyInitializer;Ljava/util/List;ILjava/lang/Object;)V
}

public final class com/mmk/kmpauth/core/di/PlatformModule_jvmKt {
public static final fun isAndroidPlatform ()Z
}

7 changes: 6 additions & 1 deletion kmpauth-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ kotlin {
}
}


js(IR) {
nodejs()
browser()
binaries.library()
}
jvm()
iosX64()
iosArm64()
iosSimulatorArm64()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.mmk.kmpauth.core.di

import com.mmk.kmpauth.core.KMPAuthInternalApi
import org.koin.core.module.Module
import org.koin.dsl.module

@KMPAuthInternalApi
public actual fun isAndroidPlatform(): Boolean = false
internal actual val platformModule: Module = module { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.mmk.kmpauth.core.di

import com.mmk.kmpauth.core.KMPAuthInternalApi
import org.koin.core.module.Module
import org.koin.dsl.module

@KMPAuthInternalApi
public actual fun isAndroidPlatform(): Boolean = false
internal actual val platformModule: Module = module { }
39 changes: 39 additions & 0 deletions kmpauth-firebase/api/android/kmpauth-firebase.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
public final class com/mmk/kmpauth/firebase/apple/AppleButtonUiContainerKt {
public static final fun AppleButtonUiContainer (Landroidx/compose/ui/Modifier;Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
public static final fun AppleButtonUiContainer (Landroidx/compose/ui/Modifier;Ljava/util/List;Lkotlin/jvm/functions/Function1;ZLkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

public abstract interface class com/mmk/kmpauth/firebase/apple/AppleSignInRequestScope {
}

public final class com/mmk/kmpauth/firebase/apple/AppleSignInRequestScope$Email : com/mmk/kmpauth/firebase/apple/AppleSignInRequestScope {
public static final field $stable I
public static final field INSTANCE Lcom/mmk/kmpauth/firebase/apple/AppleSignInRequestScope$Email;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/mmk/kmpauth/firebase/apple/AppleSignInRequestScope$FullName : com/mmk/kmpauth/firebase/apple/AppleSignInRequestScope {
public static final field $stable I
public static final field INSTANCE Lcom/mmk/kmpauth/firebase/apple/AppleSignInRequestScope$FullName;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/mmk/kmpauth/firebase/github/GithubButtonUiContainerKt {
public static final fun GithubButtonUiContainer (Landroidx/compose/ui/Modifier;Ljava/util/List;Ljava/util/Map;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
public static final fun GithubButtonUiContainer (Landroidx/compose/ui/Modifier;Ljava/util/List;Ljava/util/Map;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

public final class com/mmk/kmpauth/firebase/google/GoogleButtonUiContainerFirebaseKt {
public static final fun GoogleButtonUiContainerFirebase (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
public static final fun GoogleButtonUiContainerFirebase (Landroidx/compose/ui/Modifier;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

public final class com/mmk/kmpauth/firebase/oauth/OAuthContainer_androidKt {
public static final fun OAuthContainer (Landroidx/compose/ui/Modifier;Ldev/gitlive/firebase/auth/OAuthProvider;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
public static final fun OAuthContainer (Landroidx/compose/ui/Modifier;Ldev/gitlive/firebase/auth/OAuthProvider;Lkotlin/jvm/functions/Function1;ZLkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

Loading

0 comments on commit 9951e5d

Please sign in to comment.