Skip to content

INCLUDE DependsOn with class packages in different namespace #334

Description

@HoffiMuc

In my case, I have my main in package x.y
and want to INCLUDE / DependsOn a file in package x.a as well as in package x.y.z

@file:DependOn(...)

@file:Include("../helpers/CamelCase.kt")
@file:Include("./mappings/Jira.kt")

@file:EntryPoint("com.hoffi.something.AppKt")

package com.hoffi.something

import DependsOn
import EntryPoint
import Include
import com.hoffi.something.mappings.Histories

fun main(args: Array<String>) {
    App().main(args)
}

class App : CliktCommand() {
    override fun run() {
        ...
    }
}

doesn't find the class which is one of the defined classes in ./mappings/Jira.kt

package com.hoffi.something.mappings

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import java.time.Instant

...
@SerialName("histories")
@Serializable data class Histories(
    val author: Author,
    @Serializable(InstantSerializer::class) val created: Instant,
    val id: String,
    val items: MutableList<Items>,
)
...

gives me:

/tmp/tmp17398417963705588090.tmp/scriptlet.248cdc652452029b.kt:18:18: error: unresolved reference: something
import com.hoffi.something.mappings.Histories
                 ^

btw: ... it took me a long time to really understand your comment you added in ee7748e

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions