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

Option to generate sources into build/generated/sources/scenarios/ #2

Closed
Clashsoft opened this issue Jul 7, 2019 · 1 comment · Fixed by #9
Closed

Option to generate sources into build/generated/sources/scenarios/ #2

Clashsoft opened this issue Jul 7, 2019 · 1 comment · Fixed by #9
Assignees
Labels
feature New feature or request
Milestone

Comments

@Clashsoft
Copy link
Member

Clashsoft commented Jul 7, 2019

Useful when one does not intend to modify generated classes.

Current workaround (to be placed in build.gradle):

final File modelDir = file "$project.buildDir/generated/sources/scenarios/main/"
final File testDir = file "$project.buildDir/generated/sources/scenarios/test/"

sourceSets.main.java.srcDir(modelDir)
sourceSets.test.java.srcDir(testDir)

generateScenarioSource {
	modelDirectory = modelDir
	testDirectory = testDir
}

generateTestScenarioSource {
	modelDirectory = testDir
	testDirectory = testDir
}
@Clashsoft Clashsoft added the feature New feature or request label Jul 7, 2019
@Clashsoft Clashsoft added this to the v0.2.0 milestone Jul 7, 2019
@Clashsoft Clashsoft self-assigned this Jul 7, 2019
@Clashsoft Clashsoft removed this from the v0.2.0 milestone Aug 6, 2019
@Clashsoft Clashsoft changed the title Option to generate sources into build/generated-src/scenarios/ Option to generate sources into build/generated/sources/scenarios/ May 27, 2020
@Clashsoft
Copy link
Member Author

With #9, this can be achieved by putting either

fulibGradle {
    useGeneratedSourceDirectories()
}

or

fulibGradle.useGeneratedSourceDirectories()

in the buildscript. The behaviour is equivalent to the workaround in the issue description.

@Clashsoft Clashsoft added this to the v0.5.0 milestone Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant