Slackbot
04/13/2022, 3:41 PMSean Craft
04/13/2022, 5:33 PMdaniel
04/13/2022, 6:37 PMmainClassName change name in mid 6.x. (see my sample here: https://docs.nokee.dev/samples/jvm-application-with-jni-library/)daniel
04/13/2022, 6:37 PMSean Craft
04/13/2022, 6:45 PMSean Craft
04/13/2022, 6:46 PMdaniel
04/13/2022, 7:06 PM--stacktrace) . I would expect the mainClassName to be an extra property in the way you are accessing it. I don’t remember all the details, but I have a vague memory that mainClassName from the application plugin was accessible directly on the project that is assuming you are indeed applying the application plugin. The deprecation and removal of that property would align with what you are seeing. Gradle has a funny way of dealing with extensions and extra properties. Sometime project.<name> is convoluted. Gradle won’t complain but it will return something that is not what you expect. You could try grabbing your mainClassName directly from project.extensions or project.extensions.extraProperties to see if that is the case.Sean Craft
04/13/2022, 7:10 PMproject.convention.plugins.MockApplicationConvention = new MockApplicationConvention()
and
class MockApplicationConvention {
private String mainClassName = 'unspecified'
String getMainClassName() {
return this.mainClassName
}
void setMainClassName(String mainClassName) {
this.mainClassName = mainClassName
}
}
And I've been using that since even before Gradle 6. And the weirrrrddd thing is this all works just fine and dandy in Gradle 7+. But no longer works in Gradle 6....daniel
04/13/2022, 7:13 PMSean Craft
04/13/2022, 7:14 PMSean Craft
04/13/2022, 7:14 PMSean Craft
04/13/2022, 7:14 PMdaniel
04/13/2022, 7:14 PMdaniel
04/13/2022, 7:15 PMSean Craft
04/13/2022, 7:16 PMSean Craft
04/13/2022, 7:16 PMSean Craft
04/13/2022, 7:16 PMdaniel
04/13/2022, 7:17 PMSean Craft
04/13/2022, 7:19 PMdaniel
04/13/2022, 7:20 PMSean Craft
04/13/2022, 7:21 PMdaniel
04/13/2022, 7:22 PMdaniel
04/13/2022, 7:23 PM