Skip to content

Port to ModDevGradle #1

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Technici4n
Copy link

@Technici4n Technici4n commented Aug 3, 2024

Port to MDG. There are a few TODOs, nothing critical I think but it's worth having another look.

It would be good to also test this on a project that uses an API sourceset, datagen, and JIJ.

fun testframework() = testframeworkDependency

fun withJarJar() {
project.tasks.named<Jar>("jar") {
archiveClassifier.set("slim")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I removed this because MDG will add the jarjar stuff to the normal jar directly. It is possible to create a slim jar manually but it shouldn't be necessary.

singleInstance()
create("server") {
server()
// TODO singleInstance()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not (yet) supported by MDG as far as I know. Does this only control the IDEA run? If so it should be trivial to add.

return@guard if (hasProperty(it)) property(it)?.toString() else null
})
fun Project.localGradleProperty(name: Provider<String>): Provider<String> = name
.filter { hasProperty(it) && property(it) != null }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Incubating API, but MDG uses it internally anyway and I don't see a good alternative that preserves nullability safety. (Otherwise we'd need a Provider<String?>).

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

Successfully merging this pull request may close these issues.

1 participant