Skip to content

Commit 846f8ac

Browse files
enedclaude
andcommitted
fix: Fix Android test compilation issues
- Add missing package declaration to ExtractorTests.kt - Move test file to proper Kotlin directory structure - Add test source directory configuration to build.gradle - Add missing test dependencies (kotlin-test, mockito-core) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e4867b3 commit 846f8ac

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dev_dependencies:
1919
sdk: flutter
2020
flutter_test:
2121
sdk: flutter
22+
flutter_lints: ^6.0.0
2223

2324
flutter:
2425
uses-material-design: true

workmanager_android/android/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ android {
1919

2020
sourceSets {
2121
main.java.srcDirs += 'src/main/kotlin'
22+
test.java.srcDirs += 'src/test/kotlin'
2223
}
2324
defaultConfig {
2425
compileSdk 35
@@ -47,4 +48,6 @@ dependencies {
4748
implementation "androidx.concurrent:concurrent-futures:1.1.0"
4849

4950
testImplementation 'junit:junit:4.13.2'
51+
testImplementation "org.jetbrains.kotlin:kotlin-test"
52+
testImplementation "org.mockito:mockito-core:5.0.0"
5053
}

workmanager_android/android/src/test/java/ExtractorTests.kt renamed to workmanager_android/android/src/test/kotlin/dev/fluttercommunity/workmanager/ExtractorTests.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package dev.fluttercommunity.workmanager
2+
13
import androidx.work.NetworkType
24
import androidx.work.OutOfQuotaPolicy
35
import dev.fluttercommunity.workmanager.Extractor

0 commit comments

Comments
 (0)