Compare commits

...

9 Commits

4 changed files with 8268 additions and 4 deletions

View File

@@ -64,6 +64,7 @@ fail() {
core_build() { core_build() {
log_info "Building uhabits-core..." log_info "Building uhabits-core..."
$GRADLE ktlintCheck || fail $GRADLE ktlintCheck || fail
$GRADLE lintDebug || fail
$GRADLE :uhabits-core:build || fail $GRADLE :uhabits-core:build || fail
} }

View File

@@ -91,6 +91,12 @@ android {
buildFeatures { buildFeatures {
viewBinding = true viewBinding = true
} }
lint {
baseline = file("lint-baseline.xml")
disable += "GradleDependency"
warningsAsErrors = true
}
} }
dependencies { dependencies {

File diff suppressed because it is too large Load Diff

View File

@@ -120,10 +120,15 @@ class DateUtilsTest : BaseUnitTest() {
@Test @Test
fun getWeekdaysInMonth() { fun getWeekdaysInMonth() {
val february = GregorianCalendar(2018, Calendar.FEBRUARY, 1) fun getCalendarUTC(year: Int, month: Int, dayOfMonth: Int) =
val leapFebruary = GregorianCalendar(2020, Calendar.FEBRUARY, 1) GregorianCalendar(year, month, dayOfMonth).apply {
val month = GregorianCalendar(2020, Calendar.APRIL, 1) timeZone = TimeZone.getTimeZone("UTC")
val longMonth = GregorianCalendar(2020, Calendar.AUGUST, 1) }
val february = getCalendarUTC(2018, Calendar.FEBRUARY, 1)
val leapFebruary = getCalendarUTC(2020, Calendar.FEBRUARY, 1)
val month = getCalendarUTC(2020, Calendar.APRIL, 1)
val longMonth = getCalendarUTC(2020, Calendar.AUGUST, 1)
assertThat( assertThat(
arrayOf(4, 4, 4, 4, 4, 4, 4), arrayOf(4, 4, 4, 4, 4, 4, 4),