diff --git a/README.md b/README.md index 70a8d81..32f4c28 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ gluonfx { jniList = [] compilerArgs = [] + linkerArgs = [] runtimeArgs = [] javaStaticSdkVersion = "" diff --git a/src/main/java/com/gluonhq/gradle/ClientExtension.java b/src/main/java/com/gluonhq/gradle/ClientExtension.java index 5b14840..42036b9 100644 --- a/src/main/java/com/gluonhq/gradle/ClientExtension.java +++ b/src/main/java/com/gluonhq/gradle/ClientExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Gluon + * Copyright (c) 2019, 2022, Gluon * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -86,6 +86,11 @@ public class ClientExtension { */ private final List compilerArgs; + /** + * List of optional linker arguments + */ + private final List linkerArgs; + /** * List of optional runtime arguments */ @@ -148,6 +153,7 @@ public ClientExtension(Project project, ObjectFactory objectFactory) { this.reflectionList = new ArrayList<>(); this.jniList = new ArrayList<>(); this.compilerArgs = new ArrayList<>(); + this.linkerArgs = new ArrayList<>(); this.runtimeArgs = new ArrayList<>(); attachConfiguration = objectFactory.newInstance(AttachConfiguration.class, project); @@ -231,6 +237,15 @@ public List getCompilerArgs() { return compilerArgs; } + public void setLinkerArgs(List linkerArgs) { + this.linkerArgs.clear(); + this.linkerArgs.addAll(linkerArgs); + } + + public List getLinkerArgs() { + return linkerArgs; + } + public void setRuntimeArgs(List compilerArgs) { this.runtimeArgs.clear(); this.runtimeArgs.addAll(compilerArgs); diff --git a/src/main/java/com/gluonhq/gradle/tasks/ConfigBuild.java b/src/main/java/com/gluonhq/gradle/tasks/ConfigBuild.java index 50b5044..7778b33 100644 --- a/src/main/java/com/gluonhq/gradle/tasks/ConfigBuild.java +++ b/src/main/java/com/gluonhq/gradle/tasks/ConfigBuild.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Gluon + * Copyright (c) 2019, 2022, Gluon * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -128,6 +128,7 @@ private ProjectConfiguration createSubstrateConfiguration() { clientConfig.setResourcesList(clientExtension.getResourcesList()); clientConfig.setJniList(clientExtension.getJniList()); clientConfig.setCompilerArgs(clientExtension.getCompilerArgs()); + clientConfig.setLinkerArgs(clientExtension.getLinkerArgs()); clientConfig.setRuntimeArgs(clientExtension.getRuntimeArgs()); clientConfig.setReflectionList(clientExtension.getReflectionList()); String appId = clientExtension.getAppIdentifier();