diff --git a/Jenkinsfile b/Jenkinsfile index 169becb..32f2c1c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,10 +16,8 @@ pipeline { steps { archiveArtifacts artifacts: 'app/build/outputs/bundle/release/app-release.aab', followSymlinks: false, onlyIfSuccessful: true archiveArtifacts artifacts: 'app/build/outputs/apk/release/app-release.apk', followSymlinks: false, onlyIfSuccessful: true - archiveArtifacts artifacts: 'app/build/outputs/mapping/release/mapping.txt', followSymlinks: false, onlyIfSuccessful: true archiveArtifacts artifacts: 'wear/build/outputs/bundle/release/wear-release.aab', followSymlinks: false, onlyIfSuccessful: true archiveArtifacts artifacts: 'wear/build/outputs/apk/release/wear-release.apk', followSymlinks: false, onlyIfSuccessful: true - archiveArtifacts artifacts: 'wear/build/outputs/mapping/release/mapping.txt', followSymlinks: false, onlyIfSuccessful: true } } stage('Publish to Play Store') { @@ -27,14 +25,14 @@ pipeline { script { if (env.BRANCH_NAME == 'master') { echo 'Publishing Bundle to Beta channel (Not allowed to fail)' - androidApkUpload deobfuscationFilesPattern: 'app/build/outputs/mapping/release/mapping.txt,wear/build/outputs/mapping/release/mapping.txt', filesPattern: 'app/build/outputs/bundle/release/app-release.aab,wear/build/outputs/bundle/release/wear-release.aab', googleCredentialsId: 'Florianisme', rolloutPercentage: '20', trackName: 'beta' + androidApkUpload filesPattern: 'app/build/outputs/bundle/release/app-release.aab,wear/build/outputs/bundle/release/wear-release.aab', googleCredentialsId: 'Florianisme', rolloutPercentage: '20', trackName: 'beta' } else if (env.BRANCH_NAME == 'release') { echo 'Publishing Bundle to Internal channel (Not allowed to fail)' - androidApkUpload deobfuscationFilesPattern: 'app/build/outputs/mapping/release/mapping.txt,wear/build/outputs/mapping/release/mapping.txt', filesPattern: 'app/build/outputs/bundle/release/app-release.aab,wear/build/outputs/bundle/release/wear-release.aab', googleCredentialsId: 'Florianisme', rolloutPercentage: '100', trackName: 'internal' + androidApkUpload filesPattern: 'app/build/outputs/bundle/release/app-release.aab,wear/build/outputs/bundle/release/wear-release.aab', googleCredentialsId: 'Florianisme', rolloutPercentage: '100', trackName: 'internal' } else if (env.BRANCH_NAME == 'develop' || env.BRANCH_NAME.contains('feature')) { echo 'Publishing Bundle to Internal channel (Allowed to fail)' try { - androidApkUpload deobfuscationFilesPattern: 'app/build/outputs/mapping/release/mapping.txt,wear/build/outputs/mapping/release/mapping.txt', filesPattern: 'app/build/outputs/bundle/release/app-release.aab,wear/build/outputs/bundle/release/wear-release.aab', googleCredentialsId: 'Florianisme', rolloutPercentage: '100', trackName: 'internal' + androidApkUpload filesPattern: 'app/build/outputs/bundle/release/app-release.aab,wear/build/outputs/bundle/release/wear-release.aab', googleCredentialsId: 'Florianisme', rolloutPercentage: '100', trackName: 'internal' } catch(error) { currentBuild.result = 'SUCCESS' } diff --git a/app/build.gradle b/app/build.gradle index 24d6805..c676037 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,7 +3,7 @@ apply from: "$rootProject.projectDir/shared-build.gradle" android { defaultConfig { - versionCode 45 + versionCode 55 wearAppUnbundled true } buildFeatures { @@ -12,14 +12,14 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'androidx.appcompat:appcompat:1.6.0' implementation 'com.google.android.material:material:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.navigation:navigation-fragment:2.5.3' implementation 'androidx.navigation:navigation-ui:2.5.3' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' - def room_version = "2.4.3" + def room_version = "2.5.0" implementation "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version" diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro deleted file mode 100644 index 3e8f971..0000000 --- a/app/proguard-rules.pro +++ /dev/null @@ -1,30 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. --keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. --renamesourcefileattribute SourceFile - -# Jackson --keep @com.fasterxml.jackson.annotation.JsonIgnoreProperties class * { *; } --keep class com.fasterxml.** { *; } --keep class org.codehaus.** { *; } --keepnames class com.fasterxml.jackson.** { *; } --keepclassmembers public final enum com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility { - public static final com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility *; -} diff --git a/app/src/main/java/de/florianisme/wakeonlan/persistence/entities/Device.java b/app/src/main/java/de/florianisme/wakeonlan/persistence/entities/Device.java index 2d046ff..cba063b 100644 --- a/app/src/main/java/de/florianisme/wakeonlan/persistence/entities/Device.java +++ b/app/src/main/java/de/florianisme/wakeonlan/persistence/entities/Device.java @@ -5,28 +5,47 @@ import androidx.room.Ignore; import androidx.room.PrimaryKey; +import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + @Entity(tableName = "Devices") +@JsonIgnoreProperties(ignoreUnknown = true) public class Device { @PrimaryKey(autoGenerate = true) + @JsonProperty("id") + @JsonAlias("a") public int id; @ColumnInfo(name = "name") + @JsonProperty("name") + @JsonAlias("b") public String name; @ColumnInfo(name = "mac_address") + @JsonProperty("mac_address") + @JsonAlias("c") public String macAddress; @ColumnInfo(name = "broadcast_address") + @JsonProperty("broadcast_address") + @JsonAlias("d") public String broadcastAddress; @ColumnInfo(name = "port") + @JsonProperty("port") + @JsonAlias("e") public int port; @ColumnInfo(name = "status_ip") + @JsonProperty("status_ip") + @JsonAlias("f") public String statusIp; @ColumnInfo(name = "secure_on_password") + @JsonProperty("secure_on_password") + @JsonAlias("g") public String secureOnPassword; @Ignore diff --git a/build.gradle b/build.gradle index 063716c..7f4fd88 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:7.4.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0e2ce2e..32d3669 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Dec 23 12:21:22 CET 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/shared-build.gradle b/shared-build.gradle index 9fdb679..6d42b0f 100644 --- a/shared-build.gradle +++ b/shared-build.gradle @@ -1,6 +1,6 @@ android { namespace 'de.florianisme.wakeonlan' - compileSdk 32 + compileSdk 33 signingConfigs { release { @@ -17,8 +17,8 @@ android { defaultConfig { applicationId "de.florianisme.wakeonlan" minSdk 24 - targetSdk 32 - versionName "1.6.1" + targetSdk 33 + versionName "1.6.5" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -26,9 +26,6 @@ android { buildTypes { release { signingConfig signingConfigs.release - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { diff --git a/wear/build.gradle b/wear/build.gradle index f7ff163..074c96e 100644 --- a/wear/build.gradle +++ b/wear/build.gradle @@ -3,7 +3,7 @@ apply from: "$rootProject.projectDir/shared-build.gradle" android { defaultConfig { - versionCode 44 + versionCode 54 } } diff --git a/wear/proguard-rules.pro b/wear/proguard-rules.pro deleted file mode 100644 index 3e8f971..0000000 --- a/wear/proguard-rules.pro +++ /dev/null @@ -1,30 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. --keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. --renamesourcefileattribute SourceFile - -# Jackson --keep @com.fasterxml.jackson.annotation.JsonIgnoreProperties class * { *; } --keep class com.fasterxml.** { *; } --keep class org.codehaus.** { *; } --keepnames class com.fasterxml.jackson.** { *; } --keepclassmembers public final enum com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility { - public static final com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility *; -}