Compare commits

...

11 Commits

6 changed files with 8265 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
plugins { plugins {
val kotlinVersion = "1.9.22" val kotlinVersion = "1.9.22"
id("com.android.application") version "8.1.4" apply (false) id("com.android.application") version "8.4.0" apply (false)
id("org.jetbrains.kotlin.android") version kotlinVersion apply (false) id("org.jetbrains.kotlin.android") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false) id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.multiplatform") version kotlinVersion apply (false) id("org.jetbrains.kotlin.multiplatform") version kotlinVersion apply (false)

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

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -19,7 +19,7 @@
plugins { plugins {
id("com.github.triplet.play") version "3.8.6" id("com.github.triplet.play") version "3.8.6"
id("com.android.application") version "8.1.4" id("com.android.application") version "8.4.0"
id("org.jetbrains.kotlin.android") id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.kapt") id("org.jetbrains.kotlin.kapt")
id("org.jlleitschuh.gradle.ktlint") id("org.jlleitschuh.gradle.ktlint")
@@ -91,6 +91,10 @@ android {
buildFeatures { buildFeatures {
viewBinding = true viewBinding = true
} }
lint {
abortOnError = false
}
} }
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),