Skip to content

Commit

Permalink
Merge pull request #258 from nimblehq/chore/224-rename-coroutine-temp…
Browse files Browse the repository at this point in the history
…late

[#244] Rename `CoroutineTemplate` to `template`
  • Loading branch information
toby-thanathip authored Jul 26, 2022
2 parents 139a5e2 + 15fa3b1 commit 74df138
Show file tree
Hide file tree
Showing 125 changed files with 209 additions and 209 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/review_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Detekt on CoroutineTemplate
working-directory: ./CoroutineTemplate
- name: Run Detekt on template
working-directory: ./template
run: ./gradlew detekt

- name: Run Android Lint on CoroutineTemplate
working-directory: ./CoroutineTemplate
- name: Run Android Lint on template
working-directory: ./template
run: ./gradlew lint

- name: Run unit tests and Jacoco on CoroutineTemplate
working-directory: ./CoroutineTemplate
- name: Run unit tests and Jacoco on template
working-directory: ./template
run: ./gradlew jacocoTestReport

- name: Set up Ruby
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/run_detekt_and_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Detekt on CoroutineTemplate
working-directory: ./CoroutineTemplate
- name: Run Detekt on template
working-directory: ./template
run: ./gradlew detekt

- name: Archive Detekt reports on CoroutineTemplate
- name: Archive Detekt reports on template
uses: actions/upload-artifact@v2
with:
name: DetektReportsCoroutine
path: CoroutineTemplate/build/reports/detekt/
name: DetektReportsTemplate
path: template/build/reports/detekt/

- name: Run unit tests and Jacoco on CoroutineTemplate
working-directory: ./CoroutineTemplate
- name: Run unit tests and Jacoco on template
working-directory: ./template
run: ./gradlew jacocoTestReport

- name: Archive code coverage reports on CoroutineTemplate
- name: Archive code coverage reports on template
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsCoroutine
path: CoroutineTemplate/app/build/reports/jacoco/jacocoTestReport/
name: CodeCoverageReportsTemplate
path: template/app/build/reports/jacoco/jacocoTestReport/
2 changes: 1 addition & 1 deletion .github/workflows/verify_newproject_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ jobs:
sdk install kscript 4.0.3
echo $PATH >> $GITHUB_PATH
- name: Verify generating new project from CoroutineTemplate
- name: Verify generating new project from template
working-directory: scripts
run: kscript new_project.kts package-name=co.myproject.example app-name="My Project"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*.iml
.idea
.gradle
/CoroutineTemplate/local.properties
/template/local.properties
/RxJavaTemplate[DEPRECATED]/local.properties
.DS_Store
build/
Expand Down

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions CoroutineTemplate/app/src/staging/res/values/strings.xml

This file was deleted.

2 changes: 0 additions & 2 deletions CoroutineTemplate/data/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Dir[lint_dir].each do |file_name|
android_lint.lint(inline_mode: true)
end

# Show Danger test coverage report from Jacoco for CoroutineTemplate
jacoco_dir = "CoroutineTemplate/**/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
markdown "## CoroutineTemplate Jacoco report:"
# Show Danger test coverage report from Jacoco for template
jacoco_dir = "template/**/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
markdown "## template Jacoco report:"
Dir[jacoco_dir].each do |file_name|
# Report coverage of modified files, warn if total project coverage is under 80%
# or if any modified file's coverage is under 95%
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

---

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

## Setup

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

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

4. Update `android_version_code` and `android_version_name` in `CoroutineTemplate/build.gradle`
4. Update `android_version_code` and `android_version_name` in `template/build.gradle`

## About

Expand Down
8 changes: 4 additions & 4 deletions scripts/new_project.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ object NewProject {
private const val KEY_PACKAGE_NAME = "package-name"
private const val MINUS_SEPARATOR = "-"
private const val SPACE_SEPARATOR = " "
private const val TEMPLATE_APP_NAME = "Coroutine Template"
private const val TEMPLATE_APPLICATION_CLASS_NAME = "CoroutineTemplateApplication"
private const val TEMPLATE_FOLDER_NAME = "CoroutineTemplate"
private const val TEMPLATE_PACKAGE_NAME = "co.nimblehq.coroutine"
private const val TEMPLATE_APP_NAME = "Template"
private const val TEMPLATE_APPLICATION_CLASS_NAME = "TemplateApplication"
private const val TEMPLATE_FOLDER_NAME = "template"
private const val TEMPLATE_PACKAGE_NAME = "co.nimblehq.template"

private const val PATTERN_APP = "^([A-Z][a-zA-Z0-9\\s]*)|([a-z][a-z0-9-]*)$"
private const val PATTERN_PACKAGE = "^[a-z]+(\\.[a-z][a-z0-9]*)+$"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions CoroutineTemplate/README.md → template/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Android Templates: Coroutine
# Android Templates

- Our optimized Android templates used in our android projects

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

- Put the `release.keystore` file at root `config` folder.
- Put keystore signing properties in [signing.properties](https://github.com/nimblehq/android-templates/blob/develop/CoroutineTemplate/signing.properties).
- Put keystore signing properties in [signing.properties](https://github.com/nimblehq/android-templates/blob/develop/template/signing.properties).
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {

compileSdk = Versions.ANDROID_COMPILE_SDK_VERSION
defaultConfig {
applicationId = "co.nimblehq.coroutine"
applicationId = "co.nimblehq.template"
minSdk = Versions.ANDROID_MIN_SDK_VERSION
targetSdk = Versions.ANDROID_TARGET_SDK_VERSION
versionCode = Versions.ANDROID_VERSION_CODE
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.nimblehq.coroutine">
package="co.nimblehq.template">

<application>
<activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine
package co.nimblehq.template

import androidx.appcompat.app.AppCompatActivity
import dagger.hilt.android.AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.nimblehq.coroutine">
package="co.nimblehq.template">

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

<application
android:name=".CoroutineTemplateApplication"
android:name=".TemplateApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package co.nimblehq.coroutine
package co.nimblehq.template

import android.app.Application
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

@HiltAndroidApp
class CoroutineTemplateApplication : Application() {
class TemplateApplication : Application() {

override fun onCreate() {
super.onCreate()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import co.nimblehq.coroutine.util.DispatchersProvider
import co.nimblehq.coroutine.util.DispatchersProviderImpl
import co.nimblehq.template.util.DispatchersProvider
import co.nimblehq.template.util.DispatchersProviderImpl
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import co.nimblehq.coroutine.data.service.providers.MoshiBuilderProvider
import co.nimblehq.template.data.service.providers.MoshiBuilderProvider
import com.squareup.moshi.Moshi
import dagger.Module
import dagger.Provides
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import co.nimblehq.coroutine.ui.screens.MainNavigator
import co.nimblehq.coroutine.ui.screens.MainNavigatorImpl
import co.nimblehq.template.ui.screens.MainNavigator
import co.nimblehq.template.ui.screens.MainNavigatorImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import co.nimblehq.coroutine.BuildConfig
import co.nimblehq.template.BuildConfig
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import co.nimblehq.coroutine.data.repository.RepositoryImpl
import co.nimblehq.coroutine.data.service.ApiService
import co.nimblehq.coroutine.domain.repository.Repository
import co.nimblehq.template.data.repository.RepositoryImpl
import co.nimblehq.template.data.service.ApiService
import co.nimblehq.template.domain.repository.Repository
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import co.nimblehq.coroutine.BuildConfig
import co.nimblehq.coroutine.data.service.ApiService
import co.nimblehq.coroutine.data.service.providers.ApiServiceProvider
import co.nimblehq.coroutine.data.service.providers.ConverterFactoryProvider
import co.nimblehq.coroutine.data.service.providers.RetrofitProvider
import co.nimblehq.template.BuildConfig
import co.nimblehq.template.data.service.ApiService
import co.nimblehq.template.data.service.providers.ApiServiceProvider
import co.nimblehq.template.data.service.providers.ConverterFactoryProvider
import co.nimblehq.template.data.service.providers.RetrofitProvider
import com.squareup.moshi.Moshi
import dagger.Module
import dagger.Provides
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package co.nimblehq.coroutine.di.modules
package co.nimblehq.template.di.modules

import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
import co.nimblehq.coroutine.data.storage.EncryptedSharedPreferences
import co.nimblehq.coroutine.data.storage.NormalSharedPreferences
import co.nimblehq.template.data.storage.EncryptedSharedPreferences
import co.nimblehq.template.data.storage.NormalSharedPreferences
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.di.modules.main
package co.nimblehq.template.di.modules.main

import dagger.Module
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.extension
package co.nimblehq.template.extension

import androidx.activity.ComponentActivity
import androidx.activity.viewModels
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package co.nimblehq.template.lib

typealias IsLoading = Boolean
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.nimblehq.coroutine.model
package co.nimblehq.template.model

import co.nimblehq.coroutine.domain.model.Model
import co.nimblehq.template.domain.model.Model

data class UiModel(
val id: Int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package co.nimblehq.coroutine.ui
package co.nimblehq.template.ui

import android.content.Context
import co.nimblehq.coroutine.R
import co.nimblehq.template.R

fun Throwable.userReadableMessage(context: Context): String {
return context.getString(R.string.error_generic)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.ui.base
package co.nimblehq.template.ui.base

import android.os.Bundle
import android.view.LayoutInflater
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.ui.base
package co.nimblehq.template.ui.base

import android.os.Bundle
import android.view.LayoutInflater
Expand All @@ -11,7 +11,7 @@ import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import co.nimblehq.coroutine.ui.common.Toaster
import co.nimblehq.template.ui.common.Toaster
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.ui.base
package co.nimblehq.template.ui.base

/**
* An interface provide abstract commitments for the implemented class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.ui.base
package co.nimblehq.template.ui.base

import android.os.Bundle
import android.view.LayoutInflater
Expand All @@ -11,8 +11,8 @@ import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import androidx.viewbinding.ViewBinding
import co.nimblehq.common.extensions.hideSoftKeyboard
import co.nimblehq.coroutine.ui.common.Toaster
import co.nimblehq.coroutine.ui.userReadableMessage
import co.nimblehq.template.ui.common.Toaster
import co.nimblehq.template.ui.userReadableMessage
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.coroutine.ui.base
package co.nimblehq.template.ui.base

/**
* An interface provide abstract commitments for the implemented class
Expand Down
Loading

0 comments on commit 74df138

Please sign in to comment.