Code Monkey home page Code Monkey logo

Comments (10)

alicederyn avatar alicederyn commented on July 23, 2024

PRs welcome

from freebuilder.

xenoterracide avatar xenoterracide commented on July 23, 2024

Are you trying to maintain support for pre java 9?

from freebuilder.

alicederyn avatar alicederyn commented on July 23, 2024

I'm not sure of the Java landscape these days. What does Android compatibility entail?

from freebuilder.

xenoterracide avatar xenoterracide commented on July 23, 2024

I don't know what android's up to. Automatic module naming is backwards compatible for sure though.

from freebuilder.

xenoterracide avatar xenoterracide commented on July 23, 2024

I believe recent-er versions of gradle can generate the automatic module manifest (I need to do some research) are you amenable to upgrading if that's the path of least resistance?

from freebuilder.

alicederyn avatar alicederyn commented on July 23, 2024

Absolutely.

from freebuilder.

xenoterracide avatar xenoterracide commented on July 23, 2024

Honestly, I went to do this, this morning, but I can't get the project to build. I'm not sure why you've done some things... so I don't want to mess around with a project that doesn't build

 Where:
Script '/home/xeno/IdeaProjects/FreeBuilder/gradle/java-compatibility.gradle' line: 34

* What went wrong:
A problem occurred evaluating root project 'FreeBuilder'.
> Could not get unknown property 'HOME' for root project 'FreeBuilder' of type org.gradle.api.Project.

to fix this you might want to upgrade to gradle 8 (it was introduced in 7, but I'm not sure which version), and use the Java Toolchain feature. I'm only guessing at what you're trying to do though.

to fix the actual issue I brought up here it should be as simple as

jar {
    manifest {
        attributes 'Automatic-Module-Name': 'org.inferred.freebuilder'
    }
}

https://stackoverflow.com/a/53912585/206466

https://blog.joda.org/2017/05/java-se-9-jpms-automatic-modules.html

from freebuilder.

xenoterracide avatar xenoterracide commented on July 23, 2024

hacky workaround (mostly using it to decide if freebuilder works for me, if not... then I have to decide what I want to do about that)

plugins {
  id("org.gradlex.extra-java-module-info").version("1.+")
}

extraJavaModuleInfo {
  automaticModule("org.inferred:freebuilder", "org.inferred.freebuilder")
  failOnMissingModuleInfo.set(false)
}

not sure if if this adds the manifest to the jar, simply gives it a name on the cli or what https://github.com/gradlex-org/extra-java-module-info

from freebuilder.

alicederyn avatar alicederyn commented on July 23, 2024

I can't get the project to build

That error's coming from these lines here:

throw new RuntimeException("Set the property $propertyName in your"
+ "$HOME/.gradle/gradle.properties, pointing to a Java $version installation")

It's supposed to write out an error message, but apparently the $HOME needs escaping in the string before it can do that. (It was supposed to be a literal dollar sign in the output.)

from freebuilder.

xenoterracide avatar xenoterracide commented on July 23, 2024

Yeah, I'm just thinking there might be a better way to do whatever you're trying to do than there was in 6. You should just be able to copy and paste those jar lines somewhere though and have add the manifest.MF when you build the jar. I haven't tested it though because... Oh because I didn't want to spend a ton of time making your build work. Especially with My IDE.

from freebuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.