Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ android {
}

testOptions {
unitTests.isReturnDefaultValues = true // Recommended for JUnit 5
useJUnitPlatform() // Add this line for JUnit 5 support
managedDevices.devices {
register<ManagedVirtualDevice>("pixel2api30") {
device = "Pixel 2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dev.adambennett.projectx

import androidx.test.core.app.launchActivity
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.jupiter.api.Test // Changed from org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
Expand Down
1 change: 0 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ tasks.wrapper {
dependencies {

compileOnly(libs.android.gradleApi)
compileOnly(libs.gradle.experimental)

implementation(libs.kotlin.gradle)
implementation(libs.android.gradle)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package dev.adambennett.feed.data

import javax.inject.Inject
import jakarta.inject.Inject

class DataModuleClass @Inject constructor()
19 changes: 17 additions & 2 deletions feed/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ repositories {
}

kotlin {
jvm()
android()
jvm {
testTask {
useJUnitPlatform()
}
}
android { // This configures the androidTarget from multiplatform
testOptions {
unitTests.all {
useJUnitPlatform()
}
}
}

sourceSets {
val commonMain by getting {
Expand Down Expand Up @@ -45,6 +55,11 @@ android {
dependencies {
debugImplementation(libs.androidx.composeUiTooling)
}

// For Android instrumented tests, if any
testOptions {
useJUnitPlatform()
}
}

compose.desktop {
Expand Down
50 changes: 24 additions & 26 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
[versions]
kotlin = "1.7.10"
androidBuildTools = "8.0.0-alpha01"
gradleExperimental = "0.11.1"
jlleitschuhKtlint = "10.2.1"
ktlint = "0.45.2"

androidx-core = "1.8.0-alpha03"
androidx-appcompat = "1.4.1"
material = "1.5.0-alpha01"
androidx-lifecycle-runtime = "2.5.0-alpha01"
androidx-activity = "1.5.0-alpha02"
compose = "1.1.1"
composeCompiler = "1.3.1"
jetbrainsCompose = "1.2.0-beta01"
composeNavigation = "2.4.1"
hilt = "2.40"
hiltComposeNavigation = "1.0.0"
javaxInject = "1"

testing-junit = "4.13.2"
testing-androidx-junit = "1.1.3"
testing-espresso-core = "3.4.0"
testing-androidx-core = "1.4.1-alpha03"
kotlin = "2.1.21"
androidBuildTools = "8.9.0"
jlleitschuhKtlint = "12.2.0"
ktlint = "1.6.0" # Was com.pinterest:ktlint, now com.pinterest.ktlint:ktlint-cli

androidx-core = "1.16.0"
androidx-appcompat = "1.7.0"
material = "1.12.0"
androidx-lifecycle-runtime = "2.9.0"
androidx-activity = "1.10.1" # For activity-compose
compose = "1.8.2" # For ui, material, etc.
composeCompiler = "1.5.15"
jetbrainsCompose = "1.8.1" # For JetBrains Compose Multiplatform
composeNavigation = "2.9.0"
hilt = "2.56.2"
hiltComposeNavigation = "1.2.0"
javaxInject = "2.0.1" # Artifact changed to jakarta.inject:jakarta.inject-api

testing-junit = "5.12.2" # JUnit 5 - Jupiter API
testing-androidx-junit = "1.2.1"
testing-espresso-core = "3.6.1"
testing-androidx-core = "1.6.1"

[libraries]
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
android-gradle = { module = "com.android.tools.build:gradle", version.ref = "androidBuildTools" }
android-gradleApi = { module = "com.android.tools.build:gradle-api", version.ref = "androidBuildTools" }
hilt-gradle = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" }
gradle-experimental = { module = "com.android.tools.build:gradle-experimental", version.ref = "gradleExperimental" }
jlleitschuhKtlint = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "jlleitschuhKtlint" }

javaxInject = { module = "javax.inject:javax.inject", version.ref = "javaxInject" }
javaxInject = { module = "jakarta.inject:jakarta.inject-api", version.ref = "javaxInject" } # Artifact changed

androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
Expand All @@ -50,7 +48,7 @@ dagger-hilt-android = { module = "com.google.dagger:hilt-android", version.ref =
dagger-hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
dagger-hilt-compose-navigation = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltComposeNavigation" }

testing-junit = { module = "junit:junit", version.ref = "testing-junit" }
testing-junit = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "testing-junit" } # Artifact changed for JUnit 5
testing-androidx-junit = { module = "androidx.test.ext:junit-ktx", version.ref = "testing-androidx-junit" }
testing-androidx-core = { module = "androidx.test:core-ktx", version.ref = "testing-androidx-core" }
testing-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "testing-espresso-core" }
Expand Down
19 changes: 17 additions & 2 deletions ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ repositories {
}

kotlin {
jvm()
android()
jvm {
testTask {
useJUnitPlatform()
}
}
android { // This configures the androidTarget from multiplatform
testOptions {
unitTests.all {
useJUnitPlatform()
}
}
}

sourceSets {
val commonMain by getting {
Expand Down Expand Up @@ -45,6 +55,11 @@ android {
dependencies {
debugImplementation(libs.androidx.composeUiTooling)
}

// For Android instrumented tests, if any
testOptions {
useJUnitPlatform()
}
}

compose.desktop {
Expand Down
Loading