Skip to content

Commit

Permalink
Updates project name to Kmplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Tweener committed Nov 9, 2023
1 parent 4a3c048 commit ff52dc1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buildDebug.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: KMMTemplate (Android 🤖) build on Android
name: Kmplate (Android 🤖) build on Android

on:
workflow_dispatch:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ vars.SLACK_GITHUB_ACTIONS_ICON_URL }}
SLACK_MESSAGE: ':white_check_mark: Build for Android :android: successful! :rocket:'
SLACK_TITLE: KMMTemplate build status
SLACK_TITLE: Kmplate build status
SLACK_USERNAME: Github Actions CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

Expand All @@ -51,6 +51,6 @@ jobs:
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: ${{ vars.SLACK_GITHUB_ACTIONS_ICON_URL }}
SLACK_MESSAGE: ':x: Build for Android :android: failed! :pensive:'
SLACK_TITLE: KMMTemplate build status
SLACK_TITLE: Kmplate build status
SLACK_USERNAME: Github Actions CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# KMM CA Template
Template to create a new KMM project based on Clean Architecture with modularization by features.
# Kmplate

Kmplate is a template to easily create a new Kotlin Multiplaform project based on Clean Architecture with modularization by features.

### 1. Create a webhook post messages on Slack

1. For Github Actions to post messages on Slack, you must create a new webhook URL by using the [Incoming Webhook](https://slack.com/apps/A0F7XDUAZ-incoming-webhooks) app.
2. Create a new [Github Actions secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) with name `SLACK_WEBHOOK_URL`, and copy paste the webhook created in the previous step as value of this secret.
2. Create a new [Github Actions secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) with name `SLACK_WEBHOOK_URL`, and copy paste the webhook created in the previous step as
value of this secret.

### 2. Configure the Slack bot to post on Slack

We will configure 2 Slack bots to post message on Slack: one bot to check for outdated dependencies, and one bot for the build status.
To configure these 2 Slack bots, we need to create 3 [Github Actions variables](https://docs.github.com/en/actions/learn-github-actions/variables):

1. `SLACK_GITHUB_ACTIONS_CHANNEL_NAME`: the name of the Slack channel where Github Actions will post messages (ie. `myproject_build_status`).
2. `SLACK_GITHUB_ACTIONS_DEPENDENCY_UPDATES_ICON_URL`: the icon URL to be used as a profile picture for the "Dependency Updates" Slack bot.
3. `SLACK_GITHUB_ACTIONS_ICON_URL`: the icon URL to be used as a profile picture for the "Github Actions CI" Slack bot.

### 3. Rename package name to your own

1. Open `buildSrc/src/main/kotlin/Dependencies.kt` and rename the following things:
1. _Line 13_: Change `MyProject` object name to your own project name,
2. _Line 14_: Change `com.tweener.changehere` package name to your own package name.
Expand All @@ -35,6 +41,7 @@ To configure these 2 Slack bots, we need to create 3 [Github Actions variables](
9. `shared/domain/src/commonTest/kotlin/com/tweener/changehere`

### 4. Update iOS configuration

1. Rename `iosApp/iosApp.xcodeproj` to your own project name. ie: `iosApp/myProjectName.xcodeproject`,
2. Rename `iosApp/iosApp.xcworkspace` to your own project name. ie: `iosApp/myProjectName.xcworkspace`,
3. Delete `MyProjectCocoaPod.podspec` file,
Expand All @@ -46,7 +53,9 @@ To configure these 2 Slack bots, we need to create 3 [Github Actions variables](
9. Run the app.

### 5. Rename Github Actions names
1. Open `.github/workflows/buildDebug.xml` and replace `KMMTemplate` on lines 1, 42 and 54 by your own name.

1. Open `.github/workflows/buildDebug.xml` and replace `Kplate` on lines 1, 42 and 54 by your own name.

### 6. Use correct `google-services.json`

1. Replace `androidApp/google-services.json` by your own `google-services.json` generated by Firebase.
2 changes: 1 addition & 1 deletion iosApp/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def swinject
end

def iosapp_shared
# KMM shared library
# KMP shared library
pod 'shared', :path => '../shared'
end

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencyResolutionManagement {
}
}

rootProject.name = "KMM_CA_Template" // TODO Change this to your project name
rootProject.name = "Kmplate" // TODO Change this to your project name
include(":androidApp")
include(":shared")
include(":shared:data")
Expand Down

0 comments on commit ff52dc1

Please sign in to comment.