Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KSP not generating NavGraph in Multi Modules #697

Open
waheed006 opened this issue Oct 31, 2024 · 0 comments
Open

KSP not generating NavGraph in Multi Modules #697

waheed006 opened this issue Oct 31, 2024 · 0 comments

Comments

@waheed006
Copy link

I have 3 modules on my app A, B, C where A & B are depend on C. In gradle.build of C module I put all libraries are accessible to module A & B but this compose-destination is making issue. I check for multiple solutions but non of them are working.

In module C gradle.buile i pu:
app 'io.github.raamcosta.compose-destinations:core:2.1.0-beta12'

and in modules A & B gradle files i put:

plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.devtools.ksp' version "1.9.22-1.0.17"
}

ksp {
    arg("compose-destinations.mode", "navgraphs")
    arg("compose-destinations.moduleName", "metro")
    arg("compose-destinations.useComposableVisibility", "true")
}

dependencies {
    ksp 'io.github.raamcosta.compose-destinations:ksp:2.1.0-beta12'
}

but still in Module A & B HomeComposeActivity showing error => "Unresolved reference: NavGraphs":

@AndroidEntryPoint
class HomeComposeActivity : ComponentActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        enableEdgeToEdge()
        super.onCreate(savedInstanceState)
        setContent {
                                 DestinationsNavHost(
                                    navGraph = NavGraphs.root,
                                    dependenciesContainerBuilder = {
                                        dependency(openDrawerCallback)
                                        dependency(modeChangeCallback)
                                    }
                                )
     }
}
@waheed006 waheed006 changed the title KSP not generating file in Multi Module KSP not generating NavGraph in Multi Modules Oct 31, 2024
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

No branches or pull requests

1 participant