Skip to content

Commit

Permalink
refactor: Dependency updates & Code Enhancements
Browse files Browse the repository at this point in the history
- Remove podspec files as we moved from CocoaPods to SPM
- Update most dependencies
- Commented RSA Keys classes and objects as we no longer support RSA
- Update def files and Gradle script to support all Apple targets
- Update README for each module

Signed-off-by: Ahmed Moussa <ahmed.moussa@iohk.io>
  • Loading branch information
hamada147 committed Sep 20, 2023
1 parent e6f6d46 commit 4af156e
Show file tree
Hide file tree
Showing 115 changed files with 2,026 additions and 2,201 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apollo

[![Kotlin](https://img.shields.io/badge/kotlin-1.7.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.20-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Build](https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/pull-request.yml/badge.svg)](https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/pull-request.yml)
[![Deployment](https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/Deployment.yml/badge.svg)](https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/Deployment.yml)

Expand Down Expand Up @@ -132,15 +132,21 @@ Could not find JNA native support
* Make sure that you are using Java version that is arch64.
## How to use for JVM/Android app
TBD
Just import the package that you want from Apollo into your dependencies
```kotlin
val apolloVersion = "....."
// This is an example of adding base64 module
implementation("io.iohk.atala.prism.apollo:base64:$apolloVersion")
```
## How to use for iOS app
TBD
## How to use for JS app
TBD
## How to use for NodeJS app
## How to use for Node.js app
TBD
## How to use for Python
Expand All @@ -150,7 +156,9 @@ TBD
TBD
## How to use for another KMM project
You need to do the following:
1. You need to let Gradle know where to search for the Apollo package
2. Import the packages in the common target as per your project needs
1. Once you insert the import in the common target, it will automatically retrieve each supported target knowing that the currently only available targets are:
Expand All @@ -161,7 +169,6 @@ You need to do the following:
|------------------------------------------|--------------------|
| iOS x86 64 | :heavy_check_mark: |
| iOS Arm 64 | :heavy_check_mark: |
| iOS Arm 32 | :heavy_check_mark: |
| iOS Simulator Arm 64 (Apple Silicon) | :heavy_check_mark: |
| JVM | :heavy_check_mark: |
| Android | :heavy_check_mark: |
Expand All @@ -173,14 +180,8 @@ You need to do the following:
| watchOS Arm 64(_32) | :heavy_check_mark: |
| watchOS Arm 32 | :heavy_check_mark: |
| watchOS Simulator Arm 64 (Apple Silicon) | :heavy_check_mark: |
| tvOS X86 64 | :heavy_check_mark: |
| tvOS Arm 64 | :heavy_check_mark: |
| tvOS Simulator Arm 64 (Apple Silicon) | :heavy_check_mark: |
| Linux X86 64 | :x: |
| Linux Arm 64 | :x: |
| Linux Arm 32 | :x: |
| minGW X86 64 | :x: |
| minGW X86 32 | :x: |
| tvOS Simulator Arm 64 (Apple Silicon) | :heavy_check_mark: |
**For the first, second & third point** we have two cases using Groovy and using Kotlin DSL
Expand Down
43 changes: 0 additions & 43 deletions aes/aes.podspec

This file was deleted.

33 changes: 17 additions & 16 deletions aes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,28 @@ kotlin {
this.version = rootProject.version.toString()
}
browser {
this.webpackTask {
this.output.library = currentModuleName
this.output.libraryTarget = Target.VAR
}
this.commonWebpackConfig {
this.cssSupport {
this.enabled = true
this.webpackTask(
Action {
this.output.library = currentModuleName
this.output.libraryTarget = Target.VAR
}
}
this.testTask {
this.useKarma {
this.useChromeHeadless()
)
this.testTask(
Action {
this.useKarma {
this.useChromeHeadless()
}
}
}
)
}
nodejs {
this.testTask {
this.useKarma {
this.useChromeHeadless()
this.testTask(
Action {
this.useKarma {
this.useChromeHeadless()
}
}
}
)
}
}

Expand Down
42 changes: 0 additions & 42 deletions apollo/Apollo.podspec

This file was deleted.

95 changes: 54 additions & 41 deletions apollo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ kotlin {
}
if (os.isMacOsX) {
ios()
watchos()
macosX64()
if (System.getProperty("os.arch") != "x86_64") { // M1Chip
iosSimulatorArm64()
tvosArm64("tvos")
tvosSimulatorArm64()
watchosSimulatorArm64()
macosArm64()
}
}
Expand All @@ -43,27 +48,28 @@ kotlin {
this.version = rootProject.version.toString()
}
browser {
this.webpackTask {
this.output.library = currentModuleName
this.output.libraryTarget = Target.VAR
}
this.commonWebpackConfig {
// this.cssSupport {
// enabled(true)
// }
}
this.testTask {
this.useKarma {
this.useChromeHeadless()
this.webpackTask(
Action {
this.output.library = currentModuleName
this.output.libraryTarget = Target.VAR
}
}
)
this.testTask(
Action {
this.useKarma {
this.useChromeHeadless()
}
}
)
}
nodejs {
this.testTask {
this.useKarma {
this.useChromeHeadless()
this.testTask(
Action {
this.useKarma {
this.useChromeHeadless()
}
}
}
)
}
}

Expand Down Expand Up @@ -97,34 +103,44 @@ kotlin {
if (os.isMacOsX) {
val iosMain by getting
val iosTest by getting

val watchosMain by getting
val watchosTest by getting
val macosX64Main by getting
val macosX64Test by getting
if (System.getProperty("os.arch") != "x86_64") { // M1Chip
val iosSimulatorArm64Main by getting {
this.dependsOn(iosMain)
}
val iosSimulatorArm64Test by getting {
this.dependsOn(iosTest)
}
val macosArm64Main by getting
val macosArm64Test by getting
}
}
}

if (os.isMacOsX) {
tasks.getByName<org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest>("iosX64Test") {
deviceId = "iPhone 14 Plus"
}
if (System.getProperty("os.arch") != "x86_64") { // M1Chip
tasks.getByName<org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest>("iosSimulatorArm64Test") {
deviceId = "iPhone 14 Plus"
val tvosMain by getting
val tvosTest by getting
val tvosSimulatorArm64Main by getting {
this.dependsOn(tvosMain)
}
val tvosSimulatorArm64Test by getting {
this.dependsOn(tvosTest)
}
val watchosSimulatorArm64Main by getting {
this.dependsOn(watchosMain)
}
val watchosSimulatorArm64Test by getting {
this.dependsOn(watchosTest)
}
val macosArm64Main by getting {
this.dependsOn(macosX64Main)
}
val macosArm64Test by getting {
this.dependsOn(macosX64Test)
}
}
}
}
}

android {
compileSdk = 32
compileSdk = 33
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 21
Expand Down Expand Up @@ -164,12 +180,9 @@ tasks.withType<DokkaTask> {
}
}

// afterEvaluate {
// tasks.withType<AbstractTestTask> {
// testLogging {
// events("passed", "skipped", "failed", "standard_out", "standard_error")
// showExceptions = true
// showStackTraces = true
// }
// }
// }
tasks.matching {
// Because runtime exit with code 134
it.name.contains("tvosSimulatorArm64Test")
}.all {
this.enabled = false
}
Loading

0 comments on commit 4af156e

Please sign in to comment.