Skip to content

Commit

Permalink
feat: setup native packages & consume them in the example apps (#7)
Browse files Browse the repository at this point in the history
* refactor: move apps to example

* refactor: move code ios to the library

* refactor: ios code to work in a library context

* refactor: use passkeys ios library in example app

* fix: UIViewControllerRepresentable class crash

* feat: make embeddedWalletUrl configurable

* feat: podspec file

* feat: an empty android library

* refactor: extract passkeys into a module

* feat: bring back onActivityResult

* refactor: onActivityResult to internal passkeys logic

* feat: automatically load on passkeys init

* feat: maven skeleton
  • Loading branch information
andrejborstnik authored Dec 17, 2024
1 parent 763cdf9 commit 42faa87
Show file tree
Hide file tree
Showing 66 changed files with 713 additions and 342 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
xcuserdata/
.DS_Store
.vscode
.vscode
.idea/
local.properties
16 changes: 1 addition & 15 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,2 @@
*.iml
.gradle
/local.properties
/.idea/
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
.gradle/
91 changes: 0 additions & 91 deletions android/app/src/main/java/com/passkeysandroid/MainActivity.kt

This file was deleted.

97 changes: 92 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,93 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
id 'signing'
}

android {
namespace 'foundation.passkeys.mobile'
compileSdk 34

defaultConfig {
minSdk 29
targetSdk 34
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation "androidx.browser:browser:1.5.0"
}

publishing {
publications {
release(MavenPublication) {
from components.release

// Configure library's Maven coordinates
groupId = 'foundation.passkeys'
artifactId = 'mobile'
version = '1.0.0'

// Define the POM metadata
pom {
name.set("Passkeys Mobile Library")
description.set("...")
url.set("https://github.com/ExodusMovement/passkeys-webview-embedded") // Replace with your GitHub or project URL

licenses {
license {
name.set("MIT")
}
}

developers {
developer {
id.set("ExodusMovement")
// name.set("Your Name")
// email.set("[email protected]")
}
}

scm {
connection.set("scm:git:github.com/ExodusMovement/passkeys-webview-embedded.git")
developerConnection.set("scm:git:ssh://github.com/ExodusMovement/passkeys-webview-embedded.git")
url.set("https://github.com/ExodusMovement/passkeys-webview-embedded")
}
}
}
}

repositories {
// maven {
// name = "MyRepo"
// url = uri("https://maven.example.com/repository/maven-releases/")

// credentials {
// username = project.findProperty("repoUser") ?: "defaultUser"
// password = project.findProperty("repoPassword") ?: "defaultPassword"
// }
// }
}
}

signing {
sign publishing.publications.release
}
Empty file added android/consumer-rules.pro
Empty file.
Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading

0 comments on commit 42faa87

Please sign in to comment.