Skip to content

Commit c243f30

Browse files
wip
Signed-off-by: tobiasKaminsky <[email protected]>
1 parent ebacb18 commit c243f30

File tree

9 files changed

+481
-805
lines changed

9 files changed

+481
-805
lines changed

.github/workflows/check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-FileCopyrightText: 2017 Tobias Kaminsky <[email protected]>
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
name: Check
5+
6+
on:
7+
pull_request:
8+
branches: [ master, stable-* ]
9+
push:
10+
branches: [ master, stable-* ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
task: [ lib:detekt, lib:spotlessKotlinCheck, lib:lint ]
22+
steps:
23+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
26+
with:
27+
distribution: "temurin"
28+
java-version: 17
29+
- name: Setup JVM options
30+
run: |
31+
mkdir -p "$HOME/.gradle"
32+
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
33+
- name: Check ${{ matrix.task }}
34+
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
35+
with:
36+
arguments: ${{ matrix.task }}
37+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
38+
if: ${{ always() }}
39+
with:
40+
name: ${{ matrix.task }}-report
41+
path: library/build/reports

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ buildscript {
1111
}
1212
repositories {
1313
google()
14-
maven { url = 'https://plugins.gradle.org/m2/' }
14+
maven { url = "https://jitpack.io" }
1515
mavenCentral()
16+
maven { url = 'https://plugins.gradle.org/m2/' }
1617
}
1718
dependencies {
1819
classpath 'com.android.tools.build:gradle:8.13.2'

lib/build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ import com.github.spotbugs.snom.Effort
1111
import com.github.spotbugs.snom.SpotBugsTask
1212
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
1313

14-
repositories {
15-
google()
16-
maven { url = "https://jitpack.io" }
17-
mavenCentral()
18-
maven { url = 'https://plugins.gradle.org/m2/' }
14+
15+
plugins {
16+
id "com.diffplug.spotless" version "8.1.0"
1917
}
2018

2119
apply plugin: "kotlin-android"
@@ -163,3 +161,10 @@ afterEvaluate {
163161
}
164162
}
165163
}
164+
165+
spotless {
166+
kotlin {
167+
target "**/*.kt"
168+
ktlint()
169+
}
170+
}

0 commit comments

Comments
 (0)