Skip to content

Commit

Permalink
Merge pull request #251 from nimblehq/release/3.9.0
Browse files Browse the repository at this point in the history
[Release] 3.9.0
  • Loading branch information
toby-thanathip authored Jul 4, 2022
2 parents c6b33b9 + 09539ab commit 2f06ee0
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 292 deletions.
16 changes: 16 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name-template: '$RESOLVED_VERSION'

tag-template: '$RESOLVED_VERSION'

categories:
- title: '⭐ Features'
label: 'type : feature'
- title: '🧹 Chores'
label: 'type : chore'
- title: '🐞 Bugs'
label: 'type : bug'

change-template: '- $TITLE'

template: |
$CHANGES
42 changes: 42 additions & 0 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Draft new release

on:
push:
branches:
- main

permissions:
contents: read

jobs:
draft_new_release:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Kscript
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install kotlin 1.6.21
sdk install kscript 4.0.3
echo $PATH >> $GITHUB_PATH
- name: Get version from the latest commit message
working-directory: scripts
run: |
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
VERSION=$(kscript get_version.kts "$COMMIT_MESSAGE")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Draft release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-name: release-drafter-config.yml
version: ${{ env.VERSION }}
12 changes: 9 additions & 3 deletions .github/workflows/verify_newproject_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Verify generating new project from RxTemplate
run: ./newproject.sh -t rx -p co.myproject.example -n "MyProjectExampleRx"
- name: Install Kscript
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install kotlin 1.6.21
sdk install kscript 4.0.3
echo $PATH >> $GITHUB_PATH
- name: Verify generating new project from CoroutineTemplate
run: ./newproject.sh -t crt -p co.myproject.example -n "MyProjectExampleCoroutine"
working-directory: scripts
run: kscript new_project.kts package-name=co.myproject.example app-name="My Project"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import java.util.concurrent.TimeUnit

private const val READ_TIME_OUT = 30L

@Module
@InstallIn(SingletonComponent::class)
Expand All @@ -18,6 +21,7 @@ class OkHttpClientModule {
addInterceptor(HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
})
readTimeout(READ_TIME_OUT, TimeUnit.SECONDS)
}
}.build()
}
2 changes: 1 addition & 1 deletion CoroutineTemplate/buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Versions {
const val ANDROID_TARGET_SDK_VERSION = 30

const val ANDROID_VERSION_CODE = 1
const val ANDROID_VERSION_NAME = "3.8.0"
const val ANDROID_VERSION_NAME = "3.9.0"

// Dependencies (Alphabet sorted)
const val ANDROID_COMMON_KTX_VERSION = "0.1.1"
Expand Down
7 changes: 5 additions & 2 deletions CoroutineTemplate/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ android {

buildTypes {
getByName(BuildType.RELEASE) {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
)
}

getByName(BuildType.DEBUG) {
isMinifyEnabled = false
/**
* From AGP 4.2.0, Jacoco generates the report incorrectly, and the report is missing
* some code coverage from module. On the new version of Gradle, they introduce a new
Expand Down
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
<p align="center">
<img alt="Nimble logo" src="https://assets.nimblehq.co/logo/light/logo-light-text-320.png" />
<a href="https://nimblehq.co/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://assets.nimblehq.co/logo/dark/logo-dark-text-320.png">
<img alt="Nimble logo" src="https://assets.nimblehq.co/logo/light/logo-light-text-320.png">
</picture>
</a>
</p>

---

A collection of templates:

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

## Setup

1. Clone or download this repository to your local machine, then extract and open the folder
2. Run `newproject.sh` script to create a new project with the following inputs:

```
-h, --help Display this usage message and exit
-t, --template [TEMPLATE] Select template: "rx" - RxJavaTemplate or "crt" - CoroutineTemplate (i.e. rx)
-p, --package-name [PACKAGE_NAME] New package name (i.e. com.example.package)
-n, --app-name [APP_NAME] New app name (i.e. MyApp, "My App")
```

Example:
- Init a new project with `RxJavaTemplate`
`./newproject.sh -t rx -p co.myproject.example -n "My Project"`
2. Install [Kscript](https://github.com/holgerbrandl/kscript#installation)
3. Run `kscript new_project.kts` to create a new project with the following arguments:
```
package-name= New package name (i.e. com.example.package)
app-name= New app name (i.e. MyApp, "My App")
```

- Init a new project with `CoroutineTemplate`
`./newproject.sh -t crt -p co.myproject.example -n "My Project"`
Example: `kscript new_project.kts package-name=co.myproject.example app-name="My Project"`

3. Update `android_version_code` and `android_version_name`
- `RxJavaTemplate[DEPRECATED]/build.gradle`
- `CoroutineTemplate/build.gradle`
4. Update `android_version_code` and `android_version_name` in `CoroutineTemplate/build.gradle`

## About

![Nimble](https://assets.nimblehq.co/logo/dark/logo-dark-text-160.png)
<a href="https://nimblehq.co/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://assets.nimblehq.co/logo/dark/logo-dark-text-160.png">
<img alt="Nimble logo" src="https://assets.nimblehq.co/logo/light/logo-light-text-160.png">
</picture>
</a>

This project is maintained and funded by Nimble.

Expand Down
13 changes: 12 additions & 1 deletion docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Welcome to the android-templates wiki!

This repository generates a new project based on our preferences, by running a simple script.

Example: `./newproject.sh -t crt -p co.myproject.example -n "MyProjectExampleCoroutine"`
Example: `kscript new_project.kts package-name=co.myproject.example app-name="My Project"`

This script must include all essentials by default, while optional features can be appended with flags. To prevent this repository from becoming a dumping playground, features can be rejected too.

Expand Down Expand Up @@ -45,4 +45,15 @@ Keep in mind, the features are based on _our team's_ requirements. In case the c

Please note that the above examples are not definitive as new and existing libraries keep on emerging and evolving.

Before an issue can be worked on, it must go through our voting process.

How do we vote on an issue? 🗳

- It is the responsibility of the RFC creator to label their proposed change as **essential** or **optional**.
- If we agree with the RFC, we must react with 👍.
- If there are 3 x 👍, then the issue is approved.
- If we disagree with the RFC, we must react with 👎 and leave a comment explaining why.
- If there are 3 x 👎, then the issue is rejected.
- If there are differing opinions, then the repository maintainer must resolve it.

Still unsure where your future contribution belongs? Let's discuss! 🚀
Loading

0 comments on commit 2f06ee0

Please sign in to comment.