diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..d1ba959 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,48 @@ +name: Build Test + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main", "develop" ] + + +jobs: + build: + name: Build Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + with: + cache-overwrite-existing: true + + - name: create google-services.json + run: | + echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > app/google-services.json + + - name: build + run: >- + ./gradlew build + -x ktlintKotlinScriptCheck -x ktlintMainSourceSetCheck -x ktlintTestSourceSetCheck + + lint: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: ktlint + uses: ScaCap/action-ktlint@master + with: + github_token: ${{ secrets.github_token }} + ktlint_version: 1.0.1 + file_glob: '!**/src/test/**' + reporter: github-pr-check # github-pr-check,github-pr-review,github-check diff --git a/gradle.properties b/gradle.properties index e17e38a..c4b1bfe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,4 +24,7 @@ android.nonTransitiveRClass=true ## Automatically convert third-party libraries to use AndroidX android.enableJetifier=true android.defaults.buildfeatures.buildconfig=true -#android.nonFinalResIds=false \ No newline at end of file +#android.nonFinalResIds=false + +org.gradle.parallel=true +org.gradle.caching=true \ No newline at end of file