Skip to content
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

Add prefix ST to all modules #12

Merged
merged 1 commit into from
Jul 30, 2024
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ dependencyResolutionManagement {
Add the following dependency to your `build.gradle.kts` file:

```kts
implementation("com.github.infomaniak.multiplatform-SwissTransfer:core:{tag}")
implementation("com.github.infomaniak.multiplatform-SwissTransfer:STCore:{tag}")
```

`build.gradle` file:

```gradle
implementation 'com.github.infomaniak.multiplatform-SwissTransfer:core:{tag}'
implementation 'com.github.infomaniak.multiplatform-SwissTransfer:STCore:{tag}'
```

For others modules:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Core/README.md → STCore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ initialized properties and methods. This class replaces traditional dependency i
To install the Network module for Android, add the following dependency to your `build.gradle.kts` file:

```kts
implementation("com.github.infomaniak.multiplatform-SwissTransfer:core:{tag}")
implementation("com.github.infomaniak.multiplatform-SwissTransfer:STCore:{tag}")
```

### iOS
Expand Down
6 changes: 3 additions & 3 deletions Core/build.gradle.kts → STCore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ plugins {
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":Common"))
implementation(project(":Database"))
implementation(project(":Network"))
implementation(project(":STCommon"))
implementation(project(":STDatabase"))
implementation(project(":STNetwork"))
}
commonTest.dependencies {
implementation(libs.kotlin.test)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Database/build.gradle.kts → STDatabase/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":Common"))
implementation(project(":STCommon"))
implementation(libs.realm.base)
}
commonTest.dependencies {
Expand Down
2 changes: 1 addition & 1 deletion Network/README.md → STNetwork/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ API and providing repositories for transfer and upload operations.
To install the Network module for Android, add the following dependency to your `build.gradle.kts` file:

```kts
implementation("com.github.infomaniak.multiplatform-SwissTransfer:network:{tag}")
implementation("com.github.infomaniak.multiplatform-SwissTransfer:STNetwork:{tag}")
```

### iOS
Expand Down
2 changes: 1 addition & 1 deletion Network/build.gradle.kts → STNetwork/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
kotlin {
sourceSets {
commonMain.dependencies {
api(project(":Common"))
api(project(":STCommon"))
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.content.negociation)
implementation(libs.ktor.client.json)
Expand Down
24 changes: 12 additions & 12 deletions buildRelease
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,28 @@ function release_ios {

# Build
echo "Build all Modules for XCFrameworks"
./gradlew :Network:assembleNetworkReleaseXCFramework
./gradlew :Database:assembleDatabaseReleaseXCFramework
./gradlew :Core:assembleCoreReleaseXCFramework
./gradlew :STNetwork:assembleSTNetworkReleaseXCFramework
./gradlew :STDatabase:assembleSTDatabaseReleaseXCFramework
./gradlew :STCore:assembleSTCoreReleaseXCFramework

# Archive
echo "Archive XCFramework to ${BOLD}release${END_BOLD} folder"
mkdir -p release
zip -r release/Network.xcframework.zip Network/build/XCFrameworks/release/Network.xcframework
zip -r release/Database.xcframework.zip Database/build/XCFrameworks/release/Database.xcframework
zip -r release/Core.xcframework.zip Core/build/XCFrameworks/release/Core.xcframework
zip -r release/STNetwork.xcframework.zip STNetwork/build/XCFrameworks/release/STNetwork.xcframework
zip -r release/STDatabase.xcframework.zip STDatabase/build/XCFrameworks/release/STDatabase.xcframework
zip -r release/STCore.xcframework.zip STCore/build/XCFrameworks/release/STCore.xcframework

# Calculate checksums
echo "Calculate modules checksums from release folder"
NETWORK_CHECKSUM=$(swift package compute-checksum release/Network.xcframework.zip)
DATABASE_CHECKSUM=$(swift package compute-checksum release/Database.xcframework.zip)
CORE_CHECKSUM=$(swift package compute-checksum release/Core.xcframework.zip)
NETWORK_CHECKSUM=$(swift package compute-checksum release/STNetwork.xcframework.zip)
DATABASE_CHECKSUM=$(swift package compute-checksum release/STDatabase.xcframework.zip)
CORE_CHECKSUM=$(swift package compute-checksum release/STCore.xcframework.zip)

# Update Package.swift
echo "${BOLD}Update Package.swift${END_BOLD}"
NETWORK_URL="https://github.com/Infomaniak/multiplatform-SwissTransfer/releases/download/$IOS_TAG/Network.xcframework.zip"
DATABASE_URL="https://github.com/Infomaniak/multiplatform-SwissTransfer/releases/download/$IOS_TAG/Database.xcframework.zip"
CORE_URL="https://github.com/Infomaniak/multiplatform-SwissTransfer/releases/download/$IOS_TAG/Core.xcframework.zip"
NETWORK_URL="https://github.com/Infomaniak/multiplatform-SwissTransfer/releases/download/$IOS_TAG/STNetwork.xcframework.zip"
DATABASE_URL="https://github.com/Infomaniak/multiplatform-SwissTransfer/releases/download/$IOS_TAG/STDatabase.xcframework.zip"
CORE_URL="https://github.com/Infomaniak/multiplatform-SwissTransfer/releases/download/$IOS_TAG/STCore.xcframework.zip"
# With the `sed` command the regex doesn't work, whereas with the `perl` command it does.
perl -0777 -pi -e "s|url: \".*Network.xcframework.zip\",(\s*)checksum: \".*\"|url: \"$NETWORK_URL\",\1checksum: \"$NETWORK_CHECKSUM\"|g" Package.swift
perl -0777 -pi -e "s|url: \".*Database.xcframework.zip\",(\s*)checksum: \".*\"|url: \"$DATABASE_URL\",\1checksum: \"$DATABASE_CHECKSUM\"|g" Package.swift
Expand Down
6 changes: 3 additions & 3 deletions buildXCFramework
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ echo "${bold}Start cleanAll Task${endBold}"
echo "${bold}cleanAll task completed.${endBold}"

echo "${bold}Start assembleDBReleaseXCFramework Task${endBold}"
./gradlew :DB:assembleDBReleaseXCFramework
./gradlew :STDatabase:assembleSTDatabaseReleaseXCFramework
echo "${bold}cleanAll task completed.${endBold}"

echo "${bold}Start assembleNetworkReleaseXCFramework Task${endBold}"
./gradlew :Network:assembleNetworkReleaseXCFramework
./gradlew :STNetwork:assembleSTNetworkReleaseXCFramework
echo "${bold}cleanAll task completed.${endBold}"

echo "${bold}Start assembleCoreReleaseXCFramework Task${endBold}"
./gradlew :Core:assembleCoreReleaseXCFramework
./gradlew :STCore:assembleSTCoreReleaseXCFramework
echo "${bold}cleanAll task completed.${endBold}"
8 changes: 4 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ dependencyResolutionManagement {
}

rootProject.name = "multiplatform-SwissTransfer"
include(":Common")
include(":Network")
include(":Database")
include(":Core")
include(":STCommon")
include(":STNetwork")
include(":STDatabase")
include(":STCore")
includeBuild("buildTools")
Loading