Skip to content

Commit

Permalink
Merge pull request #166
Browse files Browse the repository at this point in the history
[MAN-467] Upgrade nordic android libs to ver 2.2.2
  • Loading branch information
ksidirop-laerdal authored Dec 9, 2024
2 parents bc783bc + b3622f3 commit 47e1900
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ android {
}

dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.11.0'

implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'no.nordicsemi.android:mcumgr-ble:2.2.1'
implementation 'no.nordicsemi.android:mcumgr-core:2.2.1'
implementation 'no.nordicsemi.android:mcumgr-ble:2.2.2'
implementation 'no.nordicsemi.android:mcumgr-core:2.2.2'
implementation 'com.google.android.material:material:1.12.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@

<!-- these libraries are needed by the mcumgr stack even though they dont show up as dependencies inside the intellij ide -->
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/slf4j-api.jar') " DestinationFileName="slf4j-api.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-core.jar') " DestinationFileName="jackson-core.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.18.0/jackson-core-2.18.0.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-databind.jar') " DestinationFileName="jackson-databind.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.18.0/jackson-databind-2.18.0.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-annotations.jar') " DestinationFileName="jackson-annotations.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.18.0/jackson-annotations-2.18.0.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-dataformat-cbor.jar') " DestinationFileName="jackson-dataformat-cbor.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.18.0/jackson-dataformat-cbor-2.18.0.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-core.jar') " DestinationFileName="jackson-core.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.18.2/jackson-core-2.18.2.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-databind.jar') " DestinationFileName="jackson-databind.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.18.2/jackson-databind-2.18.2.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-annotations.jar') " DestinationFileName="jackson-annotations.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.18.2/jackson-annotations-2.18.2.jar"/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/jackson-dataformat-cbor.jar') " DestinationFileName="jackson-dataformat-cbor.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.18.2/jackson-dataformat-cbor-2.18.2.jar"/>

<!-- kotlinx coroutines are needed by .net6+ but we settle those through explicit nuget references over to xamarin.androix.koltin -->
<!-- <DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/kotlinx-coroutines-*.jar') " DestinationFileName="kotlinx-coroutines-*.jar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-rx2/1.7.3/kotlinx-coroutines-*-1.7.3.jar"/> -->
Expand All @@ -110,18 +110,18 @@

<!-- download -->
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble-2.9.0.aar') " DestinationFileName="nordicsemi-android-ble-2.9.0.aar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/no/nordicsemi/android/ble/2.9.0/ble-2.9.0.aar "/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.1.aar') " DestinationFileName="nordicsemi-android-mcumgr-ble-2.2.1.aar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/no/nordicsemi/android/mcumgr-ble/2.2.1/mcumgr-ble-2.2.1.aar "/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.1.aar') " DestinationFileName="nordicsemi-android-mcumgr-core-2.2.1.aar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/no/nordicsemi/android/mcumgr-core/2.2.1/mcumgr-core-2.2.1.aar "/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.2.aar') " DestinationFileName="nordicsemi-android-mcumgr-ble-2.2.2.aar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/no/nordicsemi/android/mcumgr-ble/2.2.2/mcumgr-ble-2.2.2.aar "/>
<DownloadFile Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.2.aar') " DestinationFileName="nordicsemi-android-mcumgr-core-2.2.2.aar " DestinationFolder="$(AndroidLibsDependenciesFolder)" SourceUrl="https://repo1.maven.org/maven2/no/nordicsemi/android/mcumgr-core/2.2.2/mcumgr-core-2.2.2.aar "/>

<!-- unzip -->
<Unzip Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble-2.9.0.jar') " DestinationFolder="$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble-2.9.0.aar "/>
<Unzip Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.1.jar') " DestinationFolder="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.1.aar "/>
<Unzip Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.1.jar') " DestinationFolder="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.1.aar "/>
<Unzip Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.2.jar') " DestinationFolder="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.2.aar "/>
<Unzip Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.2.jar') " DestinationFolder="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.2.aar "/>

<!-- copy -->
<Copy Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble-2.9.0.jar') " DestinationFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble-2.9.0.jar " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-ble/classes.jar "/>
<Copy Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.1.jar') " DestinationFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.1.jar " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble/classes.jar "/>
<Copy Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.1.jar') " DestinationFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.1.jar " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core/classes.jar "/>
<Copy Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.2.jar') " DestinationFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble-2.2.2.jar " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-ble/classes.jar "/>
<Copy Condition=" !Exists('$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.2.jar') " DestinationFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core-2.2.2.jar " SourceFiles="$(AndroidLibsDependenciesFolder)/nordicsemi-android-mcumgr-core/classes.jar "/>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/jackson-annotations.jar" />
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/jackson-dataformat-cbor.jar" />
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/nordicsemi-android-ble-2.9.0.jar" />
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/nordicsemi-android-mcumgr-ble-2.2.1.jar" />
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/nordicsemi-android-mcumgr-core-2.2.1.jar" />
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/nordicsemi-android-mcumgr-ble-2.2.2.jar" />
<AndroidJavaLibrary Include="$(AndroidLibsFolder)/Dependencies/nordicsemi-android-mcumgr-core-2.2.2.jar" />
</ItemGroup>

<Target Name="PrintBindingConfiguration" AfterTargets="CoreCompile">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@

<ItemGroup Condition=" '$(IsNetX)' == 'true' " >
<!-- these dependencies have been field-tested and are known to work at least as far back as Android 10.0 -->
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.12.0.4" PrivateAssets="All" />
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.15.0.1" PrivateAssets="All" />

<!-- the mcumgr-file-uploading aspect KotlinX.Coroutines jars with version 1.7+ -->
<!-- to work as intended otherwise we get missing symbols errors in runtime -->
<PackageReference Include="Xamarin.KotlinX.Coroutines.Android" Version="1.8.0.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="2.0.21.1" />
<PackageReference Include="Xamarin.KotlinX.Coroutines.Android" Version="1.9.0.1" />
</ItemGroup>

</Project>
Loading

0 comments on commit 47e1900

Please sign in to comment.