Hi Amper team, I’m using the latest dev version. D...
# amper
s
Hi Amper team, I’m using the latest dev version. Does packaging only work for JVM targets? It’s not even building/linking any of the native targets. Is this expected?
Copy code
$ ./amper -v
JetBrains Amper version 0.8.0-dev-3011 (d940e57, 2025-07-28)
Also, I have a few more questions: 1. Is this possible to set the JVM arguments for the executable jar ? 2. How can set set the java compiler arguments..i need set
--enable-preview
,
-parameters
and open modules 3. Any plans to add power assert plugin support? 4. How can i set disable the debug/test build for kotlin native targets ?
👀 1
a
Hi Amper team, I’m using the latest dev version. Does packaging only work for JVM targets? It’s not even building/linking any of the native targets. Is this expected?
yes, it is expected, for now we only know what does packaging means for
jvm
and
android
platforms (or at least we could come up with some standard packaging format (it's adjustable by
--format
)) so regarding this, I've a question back: what exactly do you expect from
package
command to be produced for native targets? which targets? what is your use case (like what are you building if you can share with us)?
j
> 2. How can set set the java compiler arguments..i need set --enable-preview , -parameters and open modules We have
settings.jvm.storeParameterNames
which enables
-parameters
for the java compiler. We don't have anything for
-enable-preview
, though, but it would be a nice addition. Also, I think we should add
settings.java.freeCompilerArgs
like for Kotlin, so people can customize the java compilation even if we don't provide a typed API for it. I created this issue: https://youtrack.jetbrains.com/issue/AMPER-4534/Add-freeCompilerArgs-for-the-java-compiler
👍 1
🙏 1
> 3. Any plans to add power assert plugin support? Yes. I think it would be a good addition. We have an issue for it: https://youtrack.jetbrains.com/issue/AMPER-652/Add-support-for-kotlin-power-assert
thank you color 1
> 1. Is this possible to set the JVM arguments for the executable jar ? I don't think that's possible. And I don't mean not possible in Amper, I mean at all. The executable jar is a jar, and it needs to be run using the
java
command. Whoever runs this command controls the JVM and its arguments. We will eventually provide another distribution/packaging format for
jvm/app
which is a zip distribution (see AMPER-4535). Something like what the Gradle Distribution plugin generates. It's a zip that contains a
lib/
directory with all the jars in your runtime classpath, plus a
bin
directory with launcher scripts (bash and bat). The launcher scripts are responsible for running
java
, so in that case we can add some JVM arguments built-in.
👍 1
4. How can i set disable the debug/test build for kotlin native targets ?
@Fedor Ihnatkevich could you please help here?
f
4. How can i set disable the debug/test build for kotlin native targets ?
Can you please describe the actual and the desired behaviour for your usecase? We have
--variant
argument that can select debug/release in CLI. Debug is the default.
s
> I’ve a question back: what exactly do you expect from
package
command to be produced for native targets? which targets? what is your use case (like what are you building if you can share with us)? @Anton Prokhorov It’s a small multiplatform CLI app that targets JVM, Linux, Mac, and Windows. I get that
package
might not apply, or might be different, for various targets, but I was hoping it would at least build/link the binary when I run it. Right now, when I execute
package
, it doesn’t even build or link the native targets. So, to get the final executables for a multiplatform CLI, I actually have to run two commands: • `./amper build`: This builds all targets, including the native binaries for Windows, Mac, and Linux, plus the non-executable jvm jar. • `./amper package`: This handles the JVM package (executable jar). IMHO, this doesn’t feel super intuitive. I’d really expect
package
to at least build the native binaries, even if the packaging step itself is a no-op for now (since it’s not available).
🙏 1
We have
--variant
argument
@Fedor Ihnatkevich My bad, I missed that option. I can now generate the release variant. Thanks a lot
We have
settings.jvm.storeParameterNames
@joffreyThank you for all the details. The native build is somehow failing with the following error when I enable that option for JVM target
Copy code
00:02.953 ERROR :shared:compileLinuxX64Release error: invalid argument: -java-parameters
    00:02.954 ERROR :shared:compileLinuxX64Release info: use -help for more information
    00:03.092 ERROR :shared:compileMacosX64Release error: invalid argument: -java-parameters
    00:03.223 ERROR :shared:compileLinuxArm64Release error: invalid argument: -java-parameters
    00:03.356 ERROR :shared:compileMingwX64Release error: invalid argument: -java-parameters
    00:03.479 ERROR :shared:compileMacosArm64Release error: invalid argument: -java-parameters
fixed 1
j
@suresh oh thanks, definitely a bug. I will create a ticket and fix it. EDIT: https://youtrack.jetbrains.com/issue/AMPER-4539/Enabling-settings.jvm.storeParameterNames-fails-native-compilation
thank you color 1
@suresh since you're already using the dev version of Amper, you can already get the fix for the issue above about
-java-parameters
failing native compilations. Use
./amper update --dev
to get the latest latest
I get that package might not apply, or might be different, for various targets, but I was hoping it would at least build/link the binary when I run it. Right now, when I execute package, it doesn’t even build or link the native targets.
Oh that is mostly an oversight on our end. This is a very good point and we'll think about how to approach this. Thanks for the feedback!
💯 1
s
@joffrey awesome..storeParameterNames is working now 👏
j
Good to hear 🙂
You should also have support for
settings.java.freeCompilerArgs
for any Java compiler option (since
0.8.0-dev-3025
)
🚀 1