Skip to content

Gradle tasks order is not deterministic #1153

Open
@snicoll

Description

@snicoll

While working on code and build convention integration tests, I've noticed that the outcome of the test is not deterministic as the following two snippets are generated in reverse order depending of the bean processing order:

tasks.withType(KotlinCompile) {
	kotlinOptions {
		freeCompilerArgs = ['-Xjsr305=strict']
		jvmTarget = '1.8'
	}
}

and

test {
	useJUnitPlatform()
}

There's no obvious way to order those tasks but we could order the customizers that mutate the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions