Skip to content

Commit 74df138

Browse files
Merge pull request #258 from nimblehq/chore/224-rename-coroutine-template
[#244] Rename `CoroutineTemplate` to `template`
2 parents 139a5e2 + 15fa3b1 commit 74df138

File tree

125 files changed

+209
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+209
-209
lines changed

.github/workflows/review_pull_request.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ jobs:
2929
restore-keys: |
3030
${{ runner.os }}-gradle-
3131
32-
- name: Run Detekt on CoroutineTemplate
33-
working-directory: ./CoroutineTemplate
32+
- name: Run Detekt on template
33+
working-directory: ./template
3434
run: ./gradlew detekt
3535

36-
- name: Run Android Lint on CoroutineTemplate
37-
working-directory: ./CoroutineTemplate
36+
- name: Run Android Lint on template
37+
working-directory: ./template
3838
run: ./gradlew lint
3939

40-
- name: Run unit tests and Jacoco on CoroutineTemplate
41-
working-directory: ./CoroutineTemplate
40+
- name: Run unit tests and Jacoco on template
41+
working-directory: ./template
4242
run: ./gradlew jacocoTestReport
4343

4444
- name: Set up Ruby

.github/workflows/run_detekt_and_unit_tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ jobs:
2727
restore-keys: |
2828
${{ runner.os }}-gradle-
2929
30-
- name: Run Detekt on CoroutineTemplate
31-
working-directory: ./CoroutineTemplate
30+
- name: Run Detekt on template
31+
working-directory: ./template
3232
run: ./gradlew detekt
3333

34-
- name: Archive Detekt reports on CoroutineTemplate
34+
- name: Archive Detekt reports on template
3535
uses: actions/upload-artifact@v2
3636
with:
37-
name: DetektReportsCoroutine
38-
path: CoroutineTemplate/build/reports/detekt/
37+
name: DetektReportsTemplate
38+
path: template/build/reports/detekt/
3939

40-
- name: Run unit tests and Jacoco on CoroutineTemplate
41-
working-directory: ./CoroutineTemplate
40+
- name: Run unit tests and Jacoco on template
41+
working-directory: ./template
4242
run: ./gradlew jacocoTestReport
4343

44-
- name: Archive code coverage reports on CoroutineTemplate
44+
- name: Archive code coverage reports on template
4545
uses: actions/upload-artifact@v2
4646
with:
47-
name: CodeCoverageReportsCoroutine
48-
path: CoroutineTemplate/app/build/reports/jacoco/jacocoTestReport/
47+
name: CodeCoverageReportsTemplate
48+
path: template/app/build/reports/jacoco/jacocoTestReport/

.github/workflows/verify_newproject_script.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
sdk install kscript 4.0.3
3939
echo $PATH >> $GITHUB_PATH
4040
41-
- name: Verify generating new project from CoroutineTemplate
41+
- name: Verify generating new project from template
4242
working-directory: scripts
4343
run: kscript new_project.kts package-name=co.myproject.example app-name="My Project"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
*.iml
22
.idea
33
.gradle
4-
/CoroutineTemplate/local.properties
4+
/template/local.properties
55
/RxJavaTemplate[DEPRECATED]/local.properties
66
.DS_Store
77
build/

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/lib/TypeAlias.kt

Lines changed: 0 additions & 3 deletions
This file was deleted.

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/ui/base/NavigationEvent.kt

Lines changed: 0 additions & 3 deletions
This file was deleted.

CoroutineTemplate/app/src/staging/res/values/strings.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

CoroutineTemplate/data/src/main/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

CoroutineTemplate/data/src/main/java/co/nimblehq/coroutine/data/repository/RepositoryImpl.kt

Lines changed: 0 additions & 13 deletions
This file was deleted.

CoroutineTemplate/domain/src/main/java/co/nimblehq/coroutine/domain/model/Model.kt

Lines changed: 0 additions & 5 deletions
This file was deleted.

CoroutineTemplate/domain/src/main/java/co/nimblehq/coroutine/domain/repository/Repository.kt

Lines changed: 0 additions & 8 deletions
This file was deleted.

Dangerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Dir[lint_dir].each do |file_name|
2929
android_lint.lint(inline_mode: true)
3030
end
3131

32-
# Show Danger test coverage report from Jacoco for CoroutineTemplate
33-
jacoco_dir = "CoroutineTemplate/**/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
34-
markdown "## CoroutineTemplate Jacoco report:"
32+
# Show Danger test coverage report from Jacoco for template
33+
jacoco_dir = "template/**/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
34+
markdown "## template Jacoco report:"
3535
Dir[jacoco_dir].each do |file_name|
3636
# Report coverage of modified files, warn if total project coverage is under 80%
3737
# or if any modified file's coverage is under 95%

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
---
1111

12-
Our Android template: **[CoroutineTemplate](https://github.com/nimblehq/android-templates/tree/develop/CoroutineTemplate)**
12+
Our Android template: **[template](https://github.com/nimblehq/android-templates/tree/develop/template)**
1313

1414
## Setup
1515

@@ -23,7 +23,7 @@ Our Android template: **[CoroutineTemplate](https://github.com/nimblehq/android-
2323

2424
Example: `kscript new_project.kts package-name=co.myproject.example app-name="My Project"`
2525

26-
4. Update `android_version_code` and `android_version_name` in `CoroutineTemplate/build.gradle`
26+
4. Update `android_version_code` and `android_version_name` in `template/build.gradle`
2727

2828
## About
2929

scripts/new_project.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ object NewProject {
88
private const val KEY_PACKAGE_NAME = "package-name"
99
private const val MINUS_SEPARATOR = "-"
1010
private const val SPACE_SEPARATOR = " "
11-
private const val TEMPLATE_APP_NAME = "Coroutine Template"
12-
private const val TEMPLATE_APPLICATION_CLASS_NAME = "CoroutineTemplateApplication"
13-
private const val TEMPLATE_FOLDER_NAME = "CoroutineTemplate"
14-
private const val TEMPLATE_PACKAGE_NAME = "co.nimblehq.coroutine"
11+
private const val TEMPLATE_APP_NAME = "Template"
12+
private const val TEMPLATE_APPLICATION_CLASS_NAME = "TemplateApplication"
13+
private const val TEMPLATE_FOLDER_NAME = "template"
14+
private const val TEMPLATE_PACKAGE_NAME = "co.nimblehq.template"
1515

1616
private const val PATTERN_APP = "^([A-Z][a-zA-Z0-9\\s]*)|([a-z][a-z0-9-]*)$"
1717
private const val PATTERN_PACKAGE = "^[a-z]+(\\.[a-z][a-z0-9]*)+$"
File renamed without changes.

CoroutineTemplate/README.md renamed to template/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Android Templates: Coroutine
1+
# Android Templates
22

33
- Our optimized Android templates used in our android projects
44

@@ -48,4 +48,4 @@ Report is located at: `./app/build/reports/jacoco/`
4848
For `release` builds, we need to provide release keystore and signing properties:
4949

5050
- Put the `release.keystore` file at root `config` folder.
51-
- Put keystore signing properties in [signing.properties](https://github.com/nimblehq/android-templates/blob/develop/CoroutineTemplate/signing.properties).
51+
- Put keystore signing properties in [signing.properties](https://github.com/nimblehq/android-templates/blob/develop/template/signing.properties).
File renamed without changes.

CoroutineTemplate/app/build.gradle.kts renamed to template/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ android {
3333

3434
compileSdk = Versions.ANDROID_COMPILE_SDK_VERSION
3535
defaultConfig {
36-
applicationId = "co.nimblehq.coroutine"
36+
applicationId = "co.nimblehq.template"
3737
minSdk = Versions.ANDROID_MIN_SDK_VERSION
3838
targetSdk = Versions.ANDROID_TARGET_SDK_VERSION
3939
versionCode = Versions.ANDROID_VERSION_CODE

CoroutineTemplate/app/src/debug/AndroidManifest.xml renamed to template/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="co.nimblehq.coroutine">
3+
package="co.nimblehq.template">
44

55
<application>
66
<activity

CoroutineTemplate/app/src/debug/java/co/nimblehq/coroutine/EmptyHiltActivity.kt renamed to template/app/src/debug/java/co/nimblehq/template/EmptyHiltActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine
1+
package co.nimblehq.template
22

33
import androidx.appcompat.app.AppCompatActivity
44
import dagger.hilt.android.AndroidEntryPoint

CoroutineTemplate/app/src/main/AndroidManifest.xml renamed to template/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="co.nimblehq.coroutine">
3+
package="co.nimblehq.template">
44

55
<uses-permission android:name="android.permission.INTERNET" />
66

77
<application
8-
android:name=".CoroutineTemplateApplication"
8+
android:name=".TemplateApplication"
99
android:allowBackup="true"
1010
android:icon="@mipmap/ic_launcher"
1111
android:label="@string/app_name"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package co.nimblehq.coroutine
1+
package co.nimblehq.template
22

33
import android.app.Application
44
import dagger.hilt.android.HiltAndroidApp
55
import timber.log.Timber
66

77
@HiltAndroidApp
8-
class CoroutineTemplateApplication : Application() {
8+
class TemplateApplication : Application() {
99

1010
override fun onCreate() {
1111
super.onCreate()

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/di/modules/AppModule.kt renamed to template/app/src/main/java/co/nimblehq/template/di/modules/AppModule.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

3-
import co.nimblehq.coroutine.util.DispatchersProvider
4-
import co.nimblehq.coroutine.util.DispatchersProviderImpl
3+
import co.nimblehq.template.util.DispatchersProvider
4+
import co.nimblehq.template.util.DispatchersProviderImpl
55
import dagger.Module
66
import dagger.Provides
77
import dagger.hilt.InstallIn

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/di/modules/MoshiModule.kt renamed to template/app/src/main/java/co/nimblehq/template/di/modules/MoshiModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

3-
import co.nimblehq.coroutine.data.service.providers.MoshiBuilderProvider
3+
import co.nimblehq.template.data.service.providers.MoshiBuilderProvider
44
import com.squareup.moshi.Moshi
55
import dagger.Module
66
import dagger.Provides

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/di/modules/NavigatorModule.kt renamed to template/app/src/main/java/co/nimblehq/template/di/modules/NavigatorModule.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

3-
import co.nimblehq.coroutine.ui.screens.MainNavigator
4-
import co.nimblehq.coroutine.ui.screens.MainNavigatorImpl
3+
import co.nimblehq.template.ui.screens.MainNavigator
4+
import co.nimblehq.template.ui.screens.MainNavigatorImpl
55
import dagger.Binds
66
import dagger.Module
77
import dagger.hilt.InstallIn
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

3-
import co.nimblehq.coroutine.BuildConfig
3+
import co.nimblehq.template.BuildConfig
44
import dagger.Module
55
import dagger.Provides
66
import dagger.hilt.InstallIn

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/di/modules/RepositoryModule.kt renamed to template/app/src/main/java/co/nimblehq/template/di/modules/RepositoryModule.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

3-
import co.nimblehq.coroutine.data.repository.RepositoryImpl
4-
import co.nimblehq.coroutine.data.service.ApiService
5-
import co.nimblehq.coroutine.domain.repository.Repository
3+
import co.nimblehq.template.data.repository.RepositoryImpl
4+
import co.nimblehq.template.data.service.ApiService
5+
import co.nimblehq.template.domain.repository.Repository
66
import dagger.Module
77
import dagger.Provides
88
import dagger.hilt.InstallIn

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/di/modules/RetrofitModule.kt renamed to template/app/src/main/java/co/nimblehq/template/di/modules/RetrofitModule.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

3-
import co.nimblehq.coroutine.BuildConfig
4-
import co.nimblehq.coroutine.data.service.ApiService
5-
import co.nimblehq.coroutine.data.service.providers.ApiServiceProvider
6-
import co.nimblehq.coroutine.data.service.providers.ConverterFactoryProvider
7-
import co.nimblehq.coroutine.data.service.providers.RetrofitProvider
3+
import co.nimblehq.template.BuildConfig
4+
import co.nimblehq.template.data.service.ApiService
5+
import co.nimblehq.template.data.service.providers.ApiServiceProvider
6+
import co.nimblehq.template.data.service.providers.ConverterFactoryProvider
7+
import co.nimblehq.template.data.service.providers.RetrofitProvider
88
import com.squareup.moshi.Moshi
99
import dagger.Module
1010
import dagger.Provides

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/di/modules/StorageModule.kt renamed to template/app/src/main/java/co/nimblehq/template/di/modules/StorageModule.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package co.nimblehq.coroutine.di.modules
1+
package co.nimblehq.template.di.modules
22

33
import android.content.Context
44
import android.content.SharedPreferences
55
import android.preference.PreferenceManager
6-
import co.nimblehq.coroutine.data.storage.EncryptedSharedPreferences
7-
import co.nimblehq.coroutine.data.storage.NormalSharedPreferences
6+
import co.nimblehq.template.data.storage.EncryptedSharedPreferences
7+
import co.nimblehq.template.data.storage.NormalSharedPreferences
88
import dagger.Module
99
import dagger.Provides
1010
import dagger.hilt.InstallIn
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.di.modules.main
1+
package co.nimblehq.template.di.modules.main
22

33
import dagger.Module
44
import dagger.hilt.InstallIn

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/extension/ViewModelExt.kt renamed to template/app/src/main/java/co/nimblehq/template/extension/ViewModelExt.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.extension
1+
package co.nimblehq.template.extension
22

33
import androidx.activity.ComponentActivity
44
import androidx.activity.viewModels
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package co.nimblehq.template.lib
2+
3+
typealias IsLoading = Boolean

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/model/UiModel.kt renamed to template/app/src/main/java/co/nimblehq/template/model/UiModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package co.nimblehq.coroutine.model
1+
package co.nimblehq.template.model
22

3-
import co.nimblehq.coroutine.domain.model.Model
3+
import co.nimblehq.template.domain.model.Model
44

55
data class UiModel(
66
val id: Int

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/ui/ErrorMapping.kt renamed to template/app/src/main/java/co/nimblehq/template/ui/ErrorMapping.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package co.nimblehq.coroutine.ui
1+
package co.nimblehq.template.ui
22

33
import android.content.Context
4-
import co.nimblehq.coroutine.R
4+
import co.nimblehq.template.R
55

66
fun Throwable.userReadableMessage(context: Context): String {
77
return context.getString(R.string.error_generic)

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/ui/base/BaseActivity.kt renamed to template/app/src/main/java/co/nimblehq/template/ui/base/BaseActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.ui.base
1+
package co.nimblehq.template.ui.base
22

33
import android.os.Bundle
44
import android.view.LayoutInflater

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/ui/base/BaseComposeFragment.kt renamed to template/app/src/main/java/co/nimblehq/template/ui/base/BaseComposeFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.ui.base
1+
package co.nimblehq.template.ui.base
22

33
import android.os.Bundle
44
import android.view.LayoutInflater
@@ -11,7 +11,7 @@ import androidx.fragment.app.Fragment
1111
import androidx.lifecycle.Lifecycle
1212
import androidx.lifecycle.lifecycleScope
1313
import androidx.lifecycle.repeatOnLifecycle
14-
import co.nimblehq.coroutine.ui.common.Toaster
14+
import co.nimblehq.template.ui.common.Toaster
1515
import kotlinx.coroutines.flow.Flow
1616
import kotlinx.coroutines.flow.collect
1717
import kotlinx.coroutines.launch
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.ui.base
1+
package co.nimblehq.template.ui.base
22

33
/**
44
* An interface provide abstract commitments for the implemented class

CoroutineTemplate/app/src/main/java/co/nimblehq/coroutine/ui/base/BaseFragment.kt renamed to template/app/src/main/java/co/nimblehq/template/ui/base/BaseFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.ui.base
1+
package co.nimblehq.template.ui.base
22

33
import android.os.Bundle
44
import android.view.LayoutInflater
@@ -11,8 +11,8 @@ import androidx.lifecycle.lifecycleScope
1111
import androidx.lifecycle.repeatOnLifecycle
1212
import androidx.viewbinding.ViewBinding
1313
import co.nimblehq.common.extensions.hideSoftKeyboard
14-
import co.nimblehq.coroutine.ui.common.Toaster
15-
import co.nimblehq.coroutine.ui.userReadableMessage
14+
import co.nimblehq.template.ui.common.Toaster
15+
import co.nimblehq.template.ui.userReadableMessage
1616
import kotlinx.coroutines.flow.Flow
1717
import kotlinx.coroutines.flow.collect
1818
import kotlinx.coroutines.launch
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.nimblehq.coroutine.ui.base
1+
package co.nimblehq.template.ui.base
22

33
/**
44
* An interface provide abstract commitments for the implemented class

0 commit comments

Comments
 (0)