From f0256e1be6564be93bc140440b6ab59523a6f516 Mon Sep 17 00:00:00 2001 From: emschu Date: Sat, 19 Aug 2023 19:51:06 +0200 Subject: [PATCH 01/15] add tests to ci and fix README --- .github/workflows/{build.yml => build_and_test.yml} | 6 +++++- README.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) rename .github/workflows/{build.yml => build_and_test.yml} (64%) diff --git a/.github/workflows/build.yml b/.github/workflows/build_and_test.yml similarity index 64% rename from .github/workflows/build.yml rename to .github/workflows/build_and_test.yml index aaa63bd..0a267d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build_and_test.yml @@ -12,7 +12,11 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: 19 + java-version: 20 cache: gradle - name: Build with Gradle run: ./gradlew build --no-daemon + - name: Run unit tests + run: ./gradlew test --no-daemon + - name: Run integration tests + run: ./gradlew connectedAndroidTest --no-daemon diff --git a/README.md b/README.md index e724a5e..7d52716 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A free software GPL v3 Android SNMP reader app. - Show basic system information - Custom queries with your OIDs, in single-query and recursive-query mode - Integrated exchangeable MIB-Catalog (see documentation for more information) - - Use the built-in MIB catalog (RFC 1213 + common MIBs of *net-snmp*) or generate and import your own as + - Use the built-in MIB catalog (RFC 1213 + common MIBs of *net-snmp*) or generate and import your own as described [here](./docs/MIB_catalog_guide.md) - QR-code support for SNMP connections - No tracking, no ads From 00442ff54dc58109478ee6b01e210b0f031d1f83 Mon Sep 17 00:00:00 2001 From: emschu Date: Sat, 19 Aug 2023 20:31:05 +0200 Subject: [PATCH 02/15] add integration test action and refine execution times --- .github/workflows/build_and_test.yml | 10 ++-- .github/workflows/integration_test.yml | 48 +++++++++++++++++++ .github/workflows/validate-gradle-wrapper.yml | 6 ++- .../org/emschu/snmp/cockpit/OidCatalogTest.kt | 2 +- 4 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/integration_test.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0a267d6..a3402a9 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1,6 +1,10 @@ -name: Build application +name: Build and test -on: [pull_request, push] +on: + pull_request: + push: + branches: + - main jobs: build: @@ -18,5 +22,3 @@ jobs: run: ./gradlew build --no-daemon - name: Run unit tests run: ./gradlew test --no-daemon - - name: Run integration tests - run: ./gradlew connectedAndroidTest --no-daemon diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml new file mode 100644 index 0000000..8402c9a --- /dev/null +++ b/.github/workflows/integration_test.yml @@ -0,0 +1,48 @@ +name: Build and test + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: macos-latest + strategy: + matrix: + api-level: [23, 27, 29, 31, 34] + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: Gradle cache + uses: gradle/gradle-build-action@v2 + + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-${{ matrix.api-level }} + + - name: create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false + script: echo "Generated AVD snapshot for caching." + + - name: run tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: ./gradlew connectedCheck diff --git a/.github/workflows/validate-gradle-wrapper.yml b/.github/workflows/validate-gradle-wrapper.yml index baffddb..19f09cc 100644 --- a/.github/workflows/validate-gradle-wrapper.yml +++ b/.github/workflows/validate-gradle-wrapper.yml @@ -1,6 +1,10 @@ name: Validate Gradle Wrapper -on: [pull_request, push] +on: + pull_request: + push: + branches: + - main jobs: validation: diff --git a/app/src/androidTest/java/org/emschu/snmp/cockpit/OidCatalogTest.kt b/app/src/androidTest/java/org/emschu/snmp/cockpit/OidCatalogTest.kt index 9e0659a..64033ae 100644 --- a/app/src/androidTest/java/org/emschu/snmp/cockpit/OidCatalogTest.kt +++ b/app/src/androidTest/java/org/emschu/snmp/cockpit/OidCatalogTest.kt @@ -36,7 +36,7 @@ class OidCatalogTest : AbstractCockpitAppTest() { Assert.assertEquals("laIndex", OIDCatalog.getAsnByOid("1.3.6.1.4.1.2021.10.1.1.1")) Assert.assertEquals("", OIDCatalog.getAsnByOid("")) - // these oid does not exist + // these oid do not exist Assert.assertEquals("", OIDCatalog.getAsnByOid("2.1")) Assert.assertEquals("ipAdEntAddr", OIDCatalog.getAsnByOid("1.3.6.1.2.1.4.20.1.1.192.168.178.21")) } From ce3082fbbc80ba5fff0e7fd10aa7e302c9ddbe85 Mon Sep 17 00:00:00 2001 From: emschu Date: Sat, 19 Aug 2023 20:44:09 +0200 Subject: [PATCH 03/15] test ci android versions --- .github/workflows/build_and_test.yml | 1 + .github/workflows/integration_test.yml | 29 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a3402a9..70958b6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -22,3 +22,4 @@ jobs: run: ./gradlew build --no-daemon - name: Run unit tests run: ./gradlew test --no-daemon + diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 8402c9a..26e7703 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -1,4 +1,4 @@ -name: Build and test +name: Integration test on: pull_request: @@ -9,9 +9,11 @@ on: jobs: test: runs-on: macos-latest + needs: build strategy: matrix: - api-level: [23, 27, 29, 31, 34] + api-level: [23, 31] + target: [default] steps: - name: checkout uses: actions/checkout@v3 @@ -28,21 +30,18 @@ jobs: ~/.android/adb* key: avd-${{ matrix.api-level }} - - name: create AVD and generate snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' + - name: Instrumentation Tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: false - script: echo "Generated AVD snapshot for caching." + target: ${{ matrix.target }} + arch: x86 + profile: Pixel 4a + script: ./gradlew connectedCheck --stacktrace - - name: run tests - uses: reactivecircus/android-emulator-runner@v2 + - name: Upload Reports + uses: actions/upload-artifact@v2 with: - api-level: ${{ matrix.api-level }} - force-avd-creation: false - emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: true - script: ./gradlew connectedCheck + name: Test-Reports + path: app/build/reports + if: always() From fd7121ff915162bf7bcb5e4924acd8a2edfee0c3 Mon Sep 17 00:00:00 2001 From: emschu Date: Sat, 19 Aug 2023 20:53:56 +0200 Subject: [PATCH 04/15] add cache to build and unit test job + activate connectedCheck by default --- .github/workflows/integration_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 26e7703..488c034 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -9,7 +9,6 @@ on: jobs: test: runs-on: macos-latest - needs: build strategy: matrix: api-level: [23, 31] From fbc0f54fe37429c3acca0d4383eaae2c94e7aeef Mon Sep 17 00:00:00 2001 From: emschu Date: Sat, 19 Aug 2023 20:59:31 +0200 Subject: [PATCH 05/15] fix gradle cache action position --- .github/workflows/build_and_test.yml | 4 ++-- .github/workflows/integration_test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 70958b6..6fbbf0b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -11,8 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up JDK 19 + - uses: actions/checkout@v3 + - name: Set up JDK 20 uses: actions/setup-java@v3 with: distribution: 'temurin' diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 488c034..85346b1 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -8,7 +8,7 @@ on: jobs: test: - runs-on: macos-latest + runs-on: macos-11 strategy: matrix: api-level: [23, 31] From 02cdfeb9fef7ed15440ee5133e976b76ba1eb96e Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:26:26 +0100 Subject: [PATCH 06/15] upgrade dependencies, gradle plugin and fix workmanager implementation. Fix --- app/build.gradle | 6 +++--- .../org/emschu/snmp/cockpit/SnmpCockpitApp.kt | 9 ++++---- .../emschu/snmp/cockpit/snmp/OIDCatalog.kt | 21 ++++++++++++++++--- build.gradle | 10 ++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 87d95f9..58571e5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -112,7 +112,7 @@ dependencies { implementation "androidx.core:core-ktx:$coreKtxVersion" implementation "androidx.appcompat:appcompat:$appCompatVersion" - implementation 'androidx.activity:activity-compose:1.7.2' + implementation 'androidx.activity:activity-compose:1.8.2' implementation "com.google.android.material:material:$googleMaterialVersion" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinGradlePluginVersion" @@ -120,7 +120,7 @@ dependencies { implementation "androidx.compose.foundation:foundation:$compose_version" implementation "androidx.compose.foundation:foundation-layout:$compose_version" - implementation "androidx.compose.material3:material3:1.1.1" + implementation "androidx.compose.material3:material3:1.1.2" implementation "androidx.compose.material:material-icons-core:$compose_version" implementation "androidx.compose.material:material-icons-extended:$compose_version" @@ -146,7 +146,7 @@ dependencies { implementation "androidx.navigation:navigation-compose:$navigationComposeVersion" implementation "androidx.navigation:navigation-ui-ktx:$navigationComposeVersion" implementation 'androidx.preference:preference-ktx:1.2.1' - implementation 'androidx.work:work-runtime:2.8.1' + implementation 'androidx.work:work-runtime:2.9.0' implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion" diff --git a/app/src/main/java/org/emschu/snmp/cockpit/SnmpCockpitApp.kt b/app/src/main/java/org/emschu/snmp/cockpit/SnmpCockpitApp.kt index d2fe4af..b0289f6 100644 --- a/app/src/main/java/org/emschu/snmp/cockpit/SnmpCockpitApp.kt +++ b/app/src/main/java/org/emschu/snmp/cockpit/SnmpCockpitApp.kt @@ -43,10 +43,6 @@ class SnmpCockpitApp : Application(), Configuration.Provider { dbHelper = CockpitDbHelper(context!!) } - override fun getWorkManagerConfiguration(): Configuration = Configuration.Builder() - .setMinimumLoggingLevel(if (BuildConfig.DEBUG) android.util.Log.DEBUG else android.util.Log.ERROR) - .build() - companion object { @JvmStatic @SuppressLint("StaticFieldLeak") @@ -83,4 +79,9 @@ class SnmpCockpitApp : Application(), Configuration.Provider { fun isConnectedToWifi(): Boolean = cockpitStateManager.networkAvailabilityObservable.value ?: true } + + override val workManagerConfiguration: Configuration + get() = Configuration.Builder() + .setMinimumLoggingLevel(if (BuildConfig.DEBUG) android.util.Log.DEBUG else android.util.Log.ERROR) + .build() } \ No newline at end of file diff --git a/app/src/main/java/org/emschu/snmp/cockpit/snmp/OIDCatalog.kt b/app/src/main/java/org/emschu/snmp/cockpit/snmp/OIDCatalog.kt index 977f3e0..a0e27c6 100644 --- a/app/src/main/java/org/emschu/snmp/cockpit/snmp/OIDCatalog.kt +++ b/app/src/main/java/org/emschu/snmp/cockpit/snmp/OIDCatalog.kt @@ -83,15 +83,30 @@ object OIDCatalog { * @return */ fun getAsnByOid(oid: String): String? { + val jsonCatalogItem = findItem(oid) + return jsonCatalogItem?.name + } + + /** + * get description an oid and strip last number (usually index) of oid for catalog lookup + * + * @param oid + * @return + */ + fun getSysDescrByOid(oid: String): String? { + val jsonCatalogItem = findItem(oid) + return jsonCatalogItem?.description + } + + private fun findItem(oid: String): JsonCatalogItem? { var key = oid while (!mapOidKey.containsKey(key) && key.contains('.')) { key = oid.substring(0, key.lastIndexOf('.')) } if (key == "" || !mapOidKey.containsKey(key)) { - return "" + return null } - val jsonCatalogItem = mapOidKey[key] - return jsonCatalogItem?.name + return mapOidKey[key] } fun load(mibCatalogManager: MibCatalogManager) { diff --git a/build.gradle b/build.gradle index 1a542a9..57bab6b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,19 +4,19 @@ apply plugin: 'org.sonarqube' buildscript { ext { compose_version = '1.5.0' - compose_version_ui = '1.5.0' + compose_version_ui = '1.5.4' kotlin_version = '1.8.10' compilerExtensionVersion = '1.4.4' kotlinGradlePluginVersion = '1.8.10' latestAboutLibsRelease = '10.9.1' - navigationComposeVersion = '2.7.0' + navigationComposeVersion = '2.7.6' junitVersion = '4.13.2' espressoVersion = '3.5.0' coreKtxVersion = '1.10.1' kotlinCoroutinesVersion = '1.7.3' appCompatVersion = '1.6.1' - googleMaterialVersion = '1.9.0' - lifecycleVersion = '2.5.1' + googleMaterialVersion = '1.11.0' + lifecycleVersion = '2.6.2' androidJUnitExtVersion = '1.1.5' } repositories { @@ -27,7 +27,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:8.1.4' + classpath 'com.android.tools.build:gradle:8.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion" classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d23393d..e4e797d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Nov 19 12:06:34 CET 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From 8fb2c4c2476e1c1d68962c505e9b4bf144264718 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:27:11 +0100 Subject: [PATCH 07/15] Fix issue with refreshing mib catalog element name and display description - if available --- .../snmp/cockpit/ui/components/BottomSheet.kt | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/emschu/snmp/cockpit/ui/components/BottomSheet.kt b/app/src/main/java/org/emschu/snmp/cockpit/ui/components/BottomSheet.kt index eb7ff3f..778a8f1 100644 --- a/app/src/main/java/org/emschu/snmp/cockpit/ui/components/BottomSheet.kt +++ b/app/src/main/java/org/emschu/snmp/cockpit/ui/components/BottomSheet.kt @@ -22,14 +22,37 @@ import android.content.Context import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll -import androidx.compose.material.* -import androidx.compose.runtime.* +import androidx.compose.material.Button +import androidx.compose.material.ButtonDefaults +import androidx.compose.material.Card +import androidx.compose.material.ExperimentalMaterialApi +import androidx.compose.material.MaterialTheme +import androidx.compose.material.ModalBottomSheetState +import androidx.compose.material.ModalBottomSheetValue +import androidx.compose.material.Text +import androidx.compose.material.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -108,7 +131,7 @@ fun BottomSheetContent( modifier = Modifier.padding(4.dp), ) } - val name: String = remember { + val name: String = remember(oidQuery.value) { OIDCatalog.getAsnByOid(oidQuery.value) ?: oidQuery.value } Row { @@ -118,6 +141,18 @@ fun BottomSheetContent( ) Text(name) } + val description: String = remember(oidQuery.value) { + OIDCatalog.getSysDescrByOid(oidQuery.value) ?: oidQuery.value + } + if (description != oidQuery.value) { + Row { + Text( + "Description:", fontWeight = FontWeight.Bold, + modifier = Modifier.padding(end = 2.dp) + ) + Text(description) + } + } val deviceList = SnmpCockpitApp.deviceManager.deviceConnectionList Row(modifier = Modifier.padding(vertical = 4.dp)) { if (deviceList.isEmpty()) { @@ -240,13 +275,13 @@ private fun BottomSheetViewPreviewLight() { private fun ConnectionSelectorLight() { val deviceConnectionLists = listOf( DeviceConnection(DeviceConfiguration(DeviceConfiguration.SNMP_VERSION.v1), - remember { mutableStateOf(SystemQuery()) }), + remember { mutableStateOf(SystemQuery()) }), DeviceConnection(DeviceConfiguration(DeviceConfiguration.SNMP_VERSION.v1), - remember { mutableStateOf(SystemQuery()) }), + remember { mutableStateOf(SystemQuery()) }), DeviceConnection(DeviceConfiguration(DeviceConfiguration.SNMP_VERSION.v1), - remember { mutableStateOf(SystemQuery()) }), + remember { mutableStateOf(SystemQuery()) }), DeviceConnection(DeviceConfiguration(DeviceConfiguration.SNMP_VERSION.v1), - remember { mutableStateOf(SystemQuery()) }), + remember { mutableStateOf(SystemQuery()) }), ) CockpitTheme(darkTheme = false) { From 488dd7f4a03c5637322db6d5b449d3bab1969ab5 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:32:36 +0100 Subject: [PATCH 08/15] ci: Change android api sdk level --- .github/workflows/integration_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 85346b1..a265e5f 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -11,7 +11,7 @@ jobs: runs-on: macos-11 strategy: matrix: - api-level: [23, 31] + api-level: [24, 31] target: [default] steps: - name: checkout @@ -39,7 +39,7 @@ jobs: script: ./gradlew connectedCheck --stacktrace - name: Upload Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Test-Reports path: app/build/reports From f98077e2d35ce158f75f1f4ab4d084ccea112568 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:38:29 +0100 Subject: [PATCH 09/15] ci: try to get a proper android sdk version in ci --- .github/workflows/integration_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index a265e5f..15b39e4 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -11,7 +11,7 @@ jobs: runs-on: macos-11 strategy: matrix: - api-level: [24, 31] + api-level: [24, 33] target: [default] steps: - name: checkout From 2a9f2a2f11ba9f03ae4cbee8b9a260a8dbb23986 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:44:16 +0100 Subject: [PATCH 10/15] ci: try to get a proper android sdk version in ci --- .github/workflows/integration_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 15b39e4..c90c82f 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -11,7 +11,7 @@ jobs: runs-on: macos-11 strategy: matrix: - api-level: [24, 33] + api-level: [33, 34] target: [default] steps: - name: checkout From 0f24948acd7a3514ddcb60da3c15f5dbba91f710 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:46:28 +0100 Subject: [PATCH 11/15] ci: try to get a proper android sdk version in ci --- .github/workflows/integration_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index c90c82f..5d3e9c5 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: api-level: [33, 34] - target: [default] + target: ["google_apis"] steps: - name: checkout uses: actions/checkout@v3 From 826d9eb89979c819034525a97923a055f48bc5ea Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:49:29 +0100 Subject: [PATCH 12/15] ci: try to remove profile --- .github/workflows/integration_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 5d3e9c5..a3d900f 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -35,7 +35,7 @@ jobs: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86 - profile: Pixel 4a + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none script: ./gradlew connectedCheck --stacktrace - name: Upload Reports From 5b2f6ab59c3ad46a0103274aec3ea298fa15dfd1 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 17:53:24 +0100 Subject: [PATCH 13/15] ci: nex try to fix android integration test --- .github/workflows/integration_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index a3d900f..fa42da9 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -34,8 +34,10 @@ jobs: with: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} - arch: x86 - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + arch: x86_64 + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true script: ./gradlew connectedCheck --stacktrace - name: Upload Reports From b2bd00c819abafd475ada0444e70b23e7f855806 Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 18:03:06 +0100 Subject: [PATCH 14/15] ci: get integration workflow to work --- .github/workflows/integration_test.yml | 3 +-- app/build.gradle | 2 +- build.gradle | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index fa42da9..a049393 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: api-level: [33, 34] - target: ["google_apis"] + target: ["default"] steps: - name: checkout uses: actions/checkout@v3 @@ -35,7 +35,6 @@ jobs: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86_64 - force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: ./gradlew connectedCheck --stacktrace diff --git a/app/build.gradle b/app/build.gradle index 58571e5..8c04869 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,7 +33,7 @@ android { applicationId "org.emschu.snmp.cockpit" minSdk 24 targetSdk 34 - versionCode 50 + versionCode 52 versionName versionCode.toString() resourceConfigurations += ['en', 'de'] diff --git a/build.gradle b/build.gradle index 57bab6b..a2a0226 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion" - classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373" + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.3.0.3225" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}" // NOTE: Do not place your application dependencies here; they belong From 27018cc32f29ba75627d9cea7e0333486be05caa Mon Sep 17 00:00:00 2001 From: emschu Date: Wed, 27 Dec 2023 18:11:57 +0100 Subject: [PATCH 15/15] add changelog, and add java version to ci --- .github/workflows/integration_test.yml | 6 ++++++ Changelog.md | 6 ++++++ build.gradle | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Changelog.md diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index a049393..85c8a48 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -20,6 +20,12 @@ jobs: - name: Gradle cache uses: gradle/gradle-build-action@v2 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: "oracle" + java-version: "17" + - name: AVD cache uses: actions/cache@v3 id: avd-cache diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..cc57c55 --- /dev/null +++ b/Changelog.md @@ -0,0 +1,6 @@ +# Changelog + +# v1.0.1 +- Mib Catalog: Fix issue with refreshing name of selected node +- Mib Catalog: Show description in bottom sheet - if any +- Dependency updates \ No newline at end of file diff --git a/build.gradle b/build.gradle index a2a0226..57bab6b 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion" - classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.3.0.3225" + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}" // NOTE: Do not place your application dependencies here; they belong