dvdciri / daggraph

Dagger dependency graph generator for Android Developers
MIT License
1.15k stars 58 forks source link

incompatible with Kotlin-DSL for gradle #57

Open beigirad opened 5 years ago

beigirad commented 5 years ago

Description

When I'm using Kotlin-DSL for build script files, daggraph does not recognize ptoject. and shows this error :

This is not a gradle folder

Steps to reproduce

Expected behaviour

nothing

Screenshot

nothing

nuhkoca commented 4 years ago

Yes, agree. I need a quick solution for this, tho :/

nuhkoca commented 4 years ago

@dvdciri help, please :)

As I see, you have below check on the codebase but I am not sure why it is throwing this error.

function isGradleFolder(rootPath){
  return fs.existsSync(path.join(rootPath, 'build.gradle')) || fs.existsSync(path.join(rootPath, 'build.gradle.kts'));
}
flywheelms commented 4 years ago

Any update on this issue?

dvdciri commented 4 years ago

Pull requests are welcome. Sorry I don't have much time to look into this right now but it seems like we need to improve the way we determine if the folder is the root of an android project. Currently using the gradle file, but we should come up with a better and more reliable solutions. Or remove the check altogether.

logoped583st commented 3 years ago

The main issue that https://github.com/dvdciri/daggraph/pull/56 was not published to npm. last publish: Aug 19, 2018 pr merged: Jan 27, 2019 I have opened sources in node module and fond

if (!isGradleFolder(rootPath)) {
      log(_chalk.default.red("This is not a gradle folder"));
      process.exit(2);
    } // Scan the folder structure and get the dagger components

quick solution: clone repo and run npm start with path to your android project @dvdciri can you please take a look for that and publish a new version when you have some time to do that?