Skip to content

Commit 8af3674

Browse files
committed
add ci file
1 parent 770a20f commit 8af3674

File tree

3 files changed

+81
-1
lines changed

3 files changed

+81
-1
lines changed

.github/workflows/ci.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
- dev
9+
types: [ opened, synchronize, reopened, ready_for_review ]
10+
push:
11+
branches:
12+
- main
13+
- dev
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
verify:
20+
name: "Verify"
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
26+
- name: setup-java
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: 17
30+
distribution: adopt
31+
32+
- name: Gradle Wrapper Validation
33+
uses: gradle/wrapper-validation-action@v1
34+
35+
- uses: actions/cache@v3
36+
with:
37+
path: |
38+
~/.gradle/caches
39+
~/.gradle/wrapper
40+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
41+
restore-keys: |
42+
${{ runner.os }}-gradle-
43+
44+
- name: Lint
45+
uses: gradle/gradle-build-action@v2
46+
with:
47+
arguments: lint --scan
48+
49+
build:
50+
name: "Build"
51+
needs: [ verify ]
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v3
56+
57+
- name: setup-java
58+
uses: actions/setup-java@v3
59+
with:
60+
java-version: 17
61+
distribution: adopt
62+
63+
- name: Gradle Wrapper Validation
64+
uses: gradle/wrapper-validation-action@v1
65+
66+
- uses: actions/cache@v3
67+
with:
68+
path: |
69+
~/.gradle/caches
70+
~/.gradle/wrapper
71+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
72+
restore-keys: |
73+
${{ runner.os }}-gradle-
74+
75+
- name: Build
76+
uses: gradle/gradle-build-action@v2
77+
with:
78+
arguments: assembleRelease --scan

build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ plugins {
44
alias(libs.plugins.androidApplication) apply false
55
alias(libs.plugins.kotlinAndroid) apply false
66
alias(libs.plugins.androidLibrary) apply false
7+
alias(libs.plugins.dokka) apply false
8+
alias(libs.plugins.dependencies)
79
}
810

911
configure(allprojects.filter { it.name != "demo" }) {

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ coil = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
3939
[plugins]
4040
androidApplication = { id = "com.android.application", version.ref = "agp" }
4141
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
42-
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
42+
dependencies = { id = "com.github.ben-manes.versions", version.ref = "versions" }
4343
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
4444
androidLibrary = { id = "com.android.library", version.ref = "agp" }
4545

0 commit comments

Comments
 (0)