Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
markgravity committed Aug 24, 2023
1 parent 9ae8585 commit 375b202
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ios_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ jobs:
${{ runner.os }}-pods-
- name: Generate KMM frameworks for Cocoapods
run: ./gradlew generateDummyFramework
working-directory: ./sample
run: |
cd ..
./gradlew generateDummyFramework
- name: Install Pods Dependencies
run: bundle exec pod install
Expand All @@ -80,9 +81,9 @@ jobs:
- name: Review pull request by Danger
uses: MeilCli/danger-action@v5
with:
plugins_file: 'ios/Gemfile'
install_path: 'ios/vendor/bundle'
danger_file: 'ios/Dangerfile'
plugins_file: 'sample/ios/Gemfile'
install_path: 'sample/ios/vendor/bundle'
danger_file: 'sample/ios/Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
kotlin(Plugins.ANDROID)
}

val keystoreProperties = loadProperties("signing.properties")
val keystoreProperties = rootDir.loadGradleProperties("signing.properties")

android {
namespace = "co.nimblehq.kmm.template.android"
Expand Down
12 changes: 12 additions & 0 deletions buildSrc/src/main/java/FileExt.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import java.io.File
import java.util.*

fun File.loadGradleProperties(fileName: String): Properties {
val properties = Properties()
val signingProperties = File(this, fileName)

if (signingProperties.isFile) {
properties.load(signingProperties.inputStream())
}
return properties
}
2 changes: 1 addition & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ rsync -av \
--exclude '.git' \
--exclude '.gitmodules' \
--exclude 'make.sh' \
--exclude 'sample' \
--exclude './sample' \
./ sample/
10 changes: 6 additions & 4 deletions make_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ cd ios

echo "=> Removing unnecessary files and folders"
rm -rf {PROJECT_NAME}/sources/data
rm -f {PROJECT_NAME}KIFUITests/Sources/Specs/Application/ApplicationSpec.swift
rm -f {PROJECT_NAME}Tests/Sources/Specs/Supports/Extensions/Foundation/OptionalUnwrapSpec.swift

# Because iOS-template is a submodule of the KKM-template, there is no .git directory.
sed -i '' "/rm -f .git*/d" make.sh
Expand Down Expand Up @@ -65,10 +67,10 @@ sed -i '' "$(($line_number + 1))i\\"$'\n'"\

# Correct path in Dangerfile
sed -i '' "s/require '\.\/fastlane\/Constants\/Constants'//g" dangerfile
sed -i '' "s/'.\//'.\/ios\//g" dangerfile
sed -i '' 's/".\//".\/ios\//g' dangerfile
sed -i '' "s/'\.swiftlint\.yml'/'\.\/ios\/\.swiftlint\.yml'/g" dangerfile
sed -i '' "s/'Pods\/\*\*'/'ios\/Pods\/\*\*'/g" dangerfile
sed -i '' "s/'.\//'.\/sample\/ios\//g" dangerfile
sed -i '' 's/".\//".\/sample\/ios\//g' dangerfile
sed -i '' "s/'\.swiftlint\.yml'/'\.\/sample\/ios\/\.swiftlint\.yml'/g" dangerfile
sed -i '' "s/'Pods\/\*\*'/'sample\/ios\/Pods\/\*\*'/g" dangerfile

echo "=> Remove unnecessary files after generating the iOS module"
rm -rf .github
Expand Down

0 comments on commit 375b202

Please sign in to comment.