Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Jan 16, 2025
1 parent 459d858 commit 492b769
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 54 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: Build

on:
push:
paths:
- '.github/workflows/build.yml'
- 'app/**'
- 'gradle/**'
- '*.gradle.*'
- '*.properties'
pull_request:
workflow_dispatch:

Expand All @@ -24,10 +18,10 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Set environments
run: |
Expand All @@ -37,26 +31,18 @@ jobs:
echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})"
} >> $GITHUB_ENV
- name: Build with Gradle
- name: Build
run: |
if [ "${{ secrets.STORE_FILE }}" == "" ]; then
echo -e "\nERROR!\nTo release, you need to set up a signing key!\n"
echo "STORE_FILE: A Base64 encoded string of the signing key in JKS format"
echo "STORE_PASSWORD: Key store password"
echo "KEY_ALIAS: Key alias"
echo "KEY_PASSWORD: Key password"
echo ""
exit 1
else
if [ "${{ secrets.STORE_FILE }}" != "" ]; then
echo "${{ secrets.STORE_FILE }}" | base64 -d > app/release.jks
export STORE_PASSWORD="${{ secrets.STORE_PASSWORD }}"
export KEY_ALIAS="${{ secrets.KEY_ALIAS }}"
export KEY_PASSWORD="${{ secrets.KEY_PASSWORD }}"
fi
./gradlew assemble --no-daemon --stacktrace
./gradlew assemble --no-daemon --stacktrace --warning-mode=all
- name: Upload APK
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Bluetooth-LE-Spam(${{ env.version }}@${{ env.commit }})
name: ${{ env.repo }}(${{ env.version }}@${{ env.commit }})
path: app/build/outputs/apk/**/app-*.apk
37 changes: 17 additions & 20 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ val app_name = "Bluetooth LE Spam"

android {
namespace = "de.simon.dankelmann.bluetoothlespam"
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "de.simon.dankelmann.bluetoothlespam"
minSdk = 26
targetSdk = 34
targetSdk = 35
versionCode = 2
versionName = "1.0.8"

//testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
create("release") {
Expand All @@ -31,8 +29,10 @@ android {

buildTypes {
configureEach {
signingConfig = signingConfigs["release"]
}
if (File("release.jks").exists()) {
signingConfig = signingConfigs["release"]
}
}
release {
resValue("string", "app_name", app_name)
isMinifyEnabled = false
Expand All @@ -47,11 +47,11 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "21"
}
buildFeatures {
viewBinding = true
Expand All @@ -60,23 +60,20 @@ android {


dependencies {
implementation("com.airbnb.android:lottie:6.3.0")
implementation("androidx.core:core-ktx:1.13.1")
implementation("com.airbnb.android:lottie:6.6.2")
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.1")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.7")
implementation("androidx.navigation:navigation-ui-ktx:2.7.7")
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
implementation("androidx.navigation:navigation-fragment-ktx:2.8.5")
implementation("androidx.navigation:navigation-ui-ktx:2.8.5")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
//testImplementation("junit:junit:4.13.2")
//androidTestImplementation("androidx.test.ext:junit:1.1.5")
//androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation("androidx.preference:preference-ktx:1.2.1")

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.1")

val room_version = "2.6.1"
implementation("androidx.room:room-runtime:$room_version")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class StartFragment : Fragment() {
_binding = null
}

fun getAppVersion():String{
fun getAppVersion():String?{
val manager = AppContext.getContext()!!.packageManager
val info = manager.getPackageInfo(AppContext.getContext().packageName, 0)
val version = info.versionName
Expand Down Expand Up @@ -397,4 +397,4 @@ class StartFragment : Fragment() {

viewModel.advertisementServiceIsReady.postValue(advertisementServiceIsReady)
}
}
}
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.4.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.23" apply false
id("androidx.navigation.safeargs.kotlin") version "2.7.7" apply false
id("com.android.application") version "8.8.0" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("androidx.navigation.safeargs.kotlin") version "2.8.5" apply false
}

buildscript {
repositories {
google()
}
dependencies {
val nav_version = "2.7.7"
val nav_version = "2.8.5"
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version")
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx1024m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
Expand All @@ -20,4 +20,4 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionSha256Sum=7a00d51fb93147819aab76024feece20b6b84e420694101f276be952e08bef03
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down

0 comments on commit 492b769

Please sign in to comment.