Cognitive-services-speech-sdk: gradle always downloads aar file (no android!)

Created on 15 Oct 2018  路  11Comments  路  Source: Azure-Samples/cognitive-services-speech-sdk

Hey there,

I want to include the Microsoft Speech SDK into my gradle project. It should run on linux.

This issue is for a: (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  • Create a gradle project
  • Set repo and dep like this (converted from maven to gradle)
repositories {
    maven {
        url "https://csspeechstorage.blob.core.windows.net/maven"
    }
}
dependencies {
    implementation "com.microsoft.cognitiveservices.speech:client-sdk:1.0.1"
}
  • Try to use sample code
  • --> Package com.microsoft.cognitiveservices.speech is not available

Any log messages given by the failure

Could not find com.microsoft.cognitiveservices.speech

Expected/desired behavior

Download .jar file instead of the .aar file

OS and Version?

Ubuntu 18.04

Versions

1.0.1

Mention any other details that might be useful

It seems like gradle always downloads the aar file.

Thank you very much! :)
Best regards

Most helpful comment

hey @fmegen

thank you really much for your effort!
After long period of failures I found a workaround for gradle. It is possible to declare an extension for the dependency:

dependencies {
    implementation group: 'com.microsoft.cognitiveservices.speech', name: 'client-sdk', version: "1.0.1", ext: "jar"
}

Best regards

All 11 comments

Thanks for reporting this issue!
I will take a look-

I have verified that the jar file is indeed in our maven repository

Please note that we currently only support Ubuntu 16.4, not yet 18.4. Could you please retest on 16.4?

kind regards
friedel

Hey fmegen,

i set up an Ubuntu 16.04 and tried it again with the same result. This time I checked the files downloaded by gradle:
https://csspeechstorage.blob.core.windows.net/maven/com/microsoft/cognitiveservices/speech/client-sdk/1.0.1/client-sdk-1.0.1.pom
In this pom is only a aar file.

Thank you for answere :)
Best regards

Edit:
I don't think this should be a problem, but for to complete my setup: I use IntelliJ Idea (current version) and gradle 4.10.2

hi @tarantelklient,

The issue probably is a combination of our maven repo setup and your IDE.

Actually, we publish both, the aar and jar as artifacts to the same package.
However, the pom only specifies aar as apckaging, ignoring the jar.

With Eclipse (which is what we use for our testing), it ignores the aar, and tries to download the package as jar.

Could you try to follow our Quickstart (using Eclipse) and see if this works for you?

I will add a task on our side to package the artifacts individually so this should not happen anymore in the future.

thanks!

kind regards,
friedel

hey @fmegen

thank you really much for your effort!
After long period of failures I found a workaround for gradle. It is possible to declare an extension for the dependency:

dependencies {
    implementation group: 'com.microsoft.cognitiveservices.speech', name: 'client-sdk', version: "1.0.1", ext: "jar"
}

Best regards

thank you for posting the work-around ... closing for now

馃憤 this issue still exists, the workaround works but it took me quite a lot of searches for the issue to find this.

For me this was happening on gradle 5 with Intellij 2018.3

Hi @wildunne,
thanks a lot for reporting this.
we will update our documentation for the java quickstart to reflect this issue

Also hit this one. Please add this to the readme for discoverability.

hey @fmegen

thank you really much for your effort!
After long period of failures I found a workaround for gradle. It is possible to declare an extension for the dependency:

dependencies {
    implementation group: 'com.microsoft.cognitiveservices.speech', name: 'client-sdk', version: "1.0.1", ext: "jar"
}

Best regards

Please update the docu with this solution since it will save a lot of people a lot of time...

This is still an issue

Was this page helpful?
0 / 5 - 0 ratings