-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: formatting, unit tests #14
Changes from all commits
ea092d4
b02941b
f2aeca9
af37f5f
393af9b
99f9db5
1c74d42
604d62a
e7e754f
39e4a53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
ruby 3.2.2 | ||
java temurin-17.0.9+9 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> | ||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<resources> | ||
<style name="AppTheme" parent="android:Theme.Material.NoActionBar"/> | ||
</resources> | ||
</resources> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,51 @@ | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent | ||
|
||
plugins { | ||
//trick: for the same plugin versions in all sub-modules | ||
// trick: for the same plugin versions in all sub-modules | ||
alias(libs.plugins.androidApplication).apply(false) | ||
alias(libs.plugins.androidLibrary).apply(false) | ||
alias(libs.plugins.kotlinAndroid).apply(false) | ||
alias(libs.plugins.kotlinMultiplatform).apply(false) | ||
id("com.diffplug.spotless").version("6.21.0") | ||
} | ||
|
||
spotless { | ||
kotlinGradle { | ||
ktlint() | ||
} | ||
} | ||
|
||
subprojects { | ||
apply(plugin = "com.diffplug.spotless") | ||
|
||
spotless { | ||
kotlin { | ||
target("src/**/*.kt") | ||
ktfmt().kotlinlangStyle() | ||
} | ||
kotlinGradle { ktfmt().kotlinlangStyle() } | ||
} | ||
|
||
tasks.withType<org.gradle.api.tasks.testing.Test> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. taken from this SO post about logging test output. There is a plugin linked from a different answer that does this and more, though customizing test logging seems to me like something that should be reasonably done out of the box. Also planning to add a ticket to the backlog for reporting code coverage on the PR, potentially with JaCoCo |
||
testLogging { | ||
// set options for log level LIFECYCLE | ||
events = setOf( | ||
TestLogEvent.FAILED, | ||
TestLogEvent.PASSED, | ||
TestLogEvent.SKIPPED, | ||
TestLogEvent.STANDARD_OUT, | ||
) | ||
|
||
exceptionFormat = TestExceptionFormat.FULL | ||
showStandardStreams = true | ||
showExceptions = true | ||
showCauses = true | ||
showStackTraces = true | ||
} | ||
} | ||
} | ||
|
||
tasks.getByName("clean", Delete::class) { | ||
delete(rootProject.buildDir) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved spotless check up above running tests