microsoft / azure-gradle-plugins

Azure Plugins for Gradle
MIT License
45 stars 28 forks source link

SignalR library is not available at runtime #159

Closed BenD10 closed 1 year ago

BenD10 commented 1 year ago

The package plugin filters out dependencies matching azure-function-java-library from packaging - https://github.com/microsoft/azure-gradle-plugins/blob/71e34e06afe43d81aa8424c023c33b4fe059a03e/azure-functions-gradle-plugin/src/main/java/com/microsoft/azure/plugin/functions/gradle/handler/PackageHandler.java#L287

However this also has the side effect of filtering out the SignalR runtime library for Azure functions which will cause those to fail since the artifact name is azure-functions-java-library-signalr.

Workaround We're using the following workaround to ensure it gets packaged up.

tasks.withType<com.microsoft.azure.plugin.functions.gradle.task.PackageTask> {
        doLast {
            copy {
                from(configurations.runtimeClasspath) {
                    include("azure-functions-java-library-signalr*")
                }
                into(layout.buildDirectory.dir("azure-functions/$FNAPP/lib"))
            }
        }
}
Flanker32 commented 1 year ago

@BenD10 Thanks a lot for your report, we will fix this issue soon

Flanker32 commented 1 year ago

@BenD10 Thanks again for your help, the issue should be resolve in https://github.com/microsoft/azure-gradle-plugins/pull/157/commits/5c882cd20df4d0ab42ef93dae35b69f9402a8e3e, we will release the fix soon, will update here once there are any updates