Skip to content

Fixing build/run issues with jvmTest and jvmRun#27

Open
dropbeardevs wants to merge 2 commits intoInsertKoinIO:mainfrom
dropbeardevs:fix-sample-app
Open

Fixing build/run issues with jvmTest and jvmRun#27
dropbeardevs wants to merge 2 commits intoInsertKoinIO:mainfrom
dropbeardevs:fix-sample-app

Conversation

@dropbeardevs
Copy link
Copy Markdown

Summary

When running ./gradlew :sample-app:jvmTest I was getting compilation errors due to, what I'm assuming, are the improved compile-time checks of the new compiler plugin. I added fixes as per the new behaviors and I'm able to build and run the jvmTest tests now.

e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/DSLTest.kt:117:23 [Koin] Missing definition: examples.MyInterface
  resolved by: get<MyInterface>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.
e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/annotations/features/ComponentScanTest.kt:85:34 [Koin] Missing definition: examples.isolated.IsolatedClassScanned
  resolved by: get<IsolatedClassScanned>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.
e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/annotations/features/ComponentScanTest.kt:113:26 [Koin] Missing definition: examples.isolated.sub.IsolatedSubpackageRepository
  resolved by: get<IsolatedSubpackageRepository>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.
e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/toplevel/TopLevelFunctionsTest.kt:42:24 [Koin] Missing definition: examples.toplevel.TLDatabaseService
  resolved by: get<TLDatabaseService>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.
e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/toplevel/TopLevelFunctionsTest.kt:64:27 [Koin] Missing definition: examples.toplevel.TLCacheService
  resolved by: get<TLCacheService>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.
e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/toplevel/TopLevelFunctionsTest.kt:102:23 [Koin] Missing definition: examples.toplevel.TLDatabaseService
  resolved by: get<TLDatabaseService>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.
e: file:///Volumes/Disk%202/Developer/koin-compiler-plugin/test-apps/sample-app/src/jvmTest/kotlin/examples/toplevel/TopLevelFunctionsTest.kt:113:28 [Koin] Missing definition: examples.toplevel.TLServiceFacade
  resolved by: get<TLServiceFacade>()
  No matching definition found in any declared module.
  Check your declaration with Annotation or DSL.

Also, I added some fixes and a dummy fun main() so jvmRun will build and run - this was the error when running ./gradlew :sample-app:jvmRun

Error: Could not find or load main class examples.annotations.AnnotationsConfigTestKt
Caused by: java.lang.ClassNotFoundException: examples.annotations.AnnotationsConfigTestKt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant