cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
432 stars 60 forks source link

Removed sources directory from apt generated directory path #440

Closed ethauvin closed 7 years ago

ethauvin commented 7 years ago

As discussed, this reverts to the previous apt implementation behavior. It does not affect kapt at all, and passed all of my tests with semver and version-processor.

The reason the sources directory was added to path is because you used the same directory creation function (generatedSources) for both kapt and apt. While kapt needs a few directories, apt doesn't.

As before, generated code is placed in generated/source/apt, and no longer in generated/source/apt/sources/.

cbeust commented 7 years ago

Makes total sense, especially since apply() already uses these different methods depending on whether we're running apt or kapt3:

    aptConfigs[project.name]?.let { config ->
        result.add(generatedDir(project, config.outputDir))
    }

    kaptConfigs[project.name]?.let { config ->
        result.add(File(generatedSources(project, context, config.outputDir)))
    }