Skip to content

Commit 0722176

Browse files
authored
Merge pull request #121 from esensar/ci
Add reusable workflows for PRs and testing builds
2 parents 4ed7c97 + a19efbd commit 0722176

File tree

7 files changed

+1364
-1
lines changed

7 files changed

+1364
-1
lines changed

.github/workflows/pr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
call-pr-workflow:
9+
uses: FossifyOrg/.github/.github/workflows/pr.yml@main
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Testing build (on PR)
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
types: [ labeled, opened, synchronize, reopened ]
7+
8+
jobs:
9+
call-testing-build-workflow:
10+
uses: FossifyOrg/.github/.github/workflows/testing-build.yml@main

app/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import java.io.FileInputStream
66
plugins {
77
alias(libs.plugins.android)
88
alias(libs.plugins.kotlinAndroid)
9+
alias(libs.plugins.detekt)
910
}
1011

1112
val keystorePropertiesFile: File = rootProject.file("keystore.properties")
@@ -89,10 +90,16 @@ android {
8990

9091
lint {
9192
checkReleaseBuilds = false
92-
abortOnError = false
93+
abortOnError = true
94+
warningsAsErrors = true
95+
baseline = file("lint-baseline.xml")
9396
}
9497
}
9598

99+
detekt {
100+
baseline = file("detekt-baseline.xml")
101+
}
102+
96103
dependencies {
97104
implementation(libs.fossify.commons)
98105
implementation(libs.androidx.documentfile)

app/detekt-baseline.xml

Lines changed: 222 additions & 0 deletions
Large diffs are not rendered by default.

app/lint-baseline.xml

Lines changed: 1111 additions & 0 deletions
Large diffs are not rendered by default.

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
22
alias(libs.plugins.android).apply(false)
33
alias(libs.plugins.kotlinAndroid).apply(false)
4+
alias(libs.plugins.detekt).apply(false)
45
}

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[versions]
22
#jetbrains
33
kotlin = "1.9.10"
4+
#Detekt
5+
detekt = "1.23.3"
46
#AndroidX
57
androidx-swiperefreshlayout = "1.1.0"
68
androidx-documentfile = "1.0.1"
@@ -39,3 +41,4 @@ zip4j = { module = "net.lingala.zip4j:zip4j", version.ref = "zip4j" }
3941
[plugins]
4042
android = { id = "com.android.application", version.ref = "gradlePlugins-agp" }
4143
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
44+
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }

0 commit comments

Comments
 (0)