Skip to content
This repository has been archived by the owner on Nov 8, 2020. It is now read-only.

cannot configure #8

Open
aram535 opened this issue Dec 22, 2018 · 2 comments
Open

cannot configure #8

aram535 opened this issue Dec 22, 2018 · 2 comments

Comments

@aram535
Copy link

aram535 commented Dec 22, 2018

Using gradle 4.9, tried it with 5.0 as well. Plugin version: 0.2.2

stats {
    formats = ['xml', 'html', 'txt']
    paths = [
        main:       [name: 'main',     path: 'src/main/java'],
        generated:  [name: 'gen',      path: 'src/generated/java']
    ]
}

Produces:

    +------------------------+--------+--------+
    | Name                   |  Files |    LOC |
    +------------------------+--------+--------+
    | Java Sources           |    795 |  43410 |
    | XML Sources            |      7 |   5578 |
    +------------------------+--------+--------+
    | Totals                 |    802 |  48988 |
    +------------------------+--------+--------+

I was expecting the report to segregate the main and generated code.

@aalmiray
Copy link
Owner

It looks like your configuration has not taken effect, as the name of the first section should be main and not Java Sources.

Did you configure a matching sourceSet too?

sourceSets {
    generated {
        java.srcDirs = ['src/generated/java']
    }
}

@aram535
Copy link
Author

aram535 commented Dec 22, 2018

Yeah I have a "apply from ... " about 10 lines above the stats { .. } section which contains this:

sourceSets {
    main
    test
    generated {
        java.srcDir file ('src/generated/java')
    }
    integTest {
        java {
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
            srcDir file ('src/integTest/java')
        }
        resources.srcDir file ('src/integTest/resources')
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants