Skip to content

Commit c13d4e3

Browse files
committed
Merge branch 'main' into gradle-versions-check
2 parents 552cc05 + 1e75381 commit c13d4e3

File tree

9 files changed

+32
-20
lines changed

9 files changed

+32
-20
lines changed

.github/workflows/build.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: actions/setup-java@v3
14+
- uses: actions/setup-java@v4
1515
with:
1616
distribution: 'temurin'
1717
java-version: '17'
@@ -47,8 +47,8 @@ jobs:
4747
env:
4848
MATRIX_OS: ${{ matrix.os }}
4949
- name: Upload build outputs
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5151
with:
52-
name: build-outputs
52+
name: build-outputs-${{ matrix.os }}
5353
path: ${{ runner.temp }}/build-outputs
5454
if-no-files-found: error

.github/workflows/codeql.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ jobs:
1515
security-events: write
1616
steps:
1717
- uses: actions/checkout@v4
18-
- uses: actions/setup-java@v3
18+
- uses: actions/setup-java@v4
1919
with:
2020
distribution: 'temurin'
2121
java-version: '17'
2222
- name: Setup Gradle
2323
uses: gradle/gradle-build-action@v2
2424
- name: Initialize CodeQL
25-
uses: github/codeql-action/init@v2
25+
uses: github/codeql-action/init@v3
2626
with:
2727
languages: java
2828
- name: Autobuild
29-
uses: github/codeql-action/autobuild@v2
29+
uses: github/codeql-action/autobuild@v3
3030
- name: Perform CodeQL Analysis
31-
uses: github/codeql-action/analyze@v2
31+
uses: github/codeql-action/analyze@v3

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.envrc
12
.gradle
23
.idea
34
build

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased][]
44

5+
## [1.3.1][] (2023-12-04)
6+
7+
Enabled code minification and resource shrinkage.
8+
59
## [1.3.0][] (2023-10-21)
610

711
Added tile update timer to solve race condition.
@@ -26,7 +30,8 @@ Added translations for 86 languages.
2630

2731
Initial release.
2832

29-
[Unreleased]: https://github.com/pcolby/nfc-quick-settings/compare/v1.3.0...HEAD
33+
[Unreleased]: https://github.com/pcolby/nfc-quick-settings/compare/v1.3.1...HEAD
34+
[1.3.1]: https://github.com/pcolby/nfc-quick-settings/releases/tag/v1.3.1
3035
[1.3.0]: https://github.com/pcolby/nfc-quick-settings/releases/tag/v1.3.0
3136
[1.2.2]: https://github.com/pcolby/nfc-quick-settings/releases/tag/v1.2.2
3237
[1.2.1]: https://github.com/pcolby/nfc-quick-settings/releases/tag/v1.2.1

app/build.gradle

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ android {
3030
applicationId "au.id.colby.nfcquicksettings"
3131
minSdk 24
3232
targetSdk 34
33-
versionCode 8
34-
versionName "1.3.0-post"
33+
versionCode 9
34+
versionName "1.3.2-pre"
3535
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3636
}
3737

3838
buildTypes {
3939
release {
40-
minifyEnabled false
40+
minifyEnabled true
41+
ndk { debugSymbolLevel 'FULL' }
4142
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
43+
shrinkResources true
4244
if (signingConfigs.hasProperty("release")) signingConfig = signingConfigs.release
4345
}
4446
}
@@ -60,7 +62,7 @@ base {
6062
dependencies {
6163
implementation 'androidx.core:core-ktx:1.12.0'
6264
implementation 'androidx.appcompat:appcompat:1.6.1'
63-
implementation 'com.google.android.material:material:1.9.0'
65+
implementation 'com.google.android.material:material:1.10.0'
6466
testImplementation 'junit:junit:4.13.2'
6567
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
6668
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

app/src/androidTest/java/au/id/colby/nfcquicksettings/ExampleInstrumentedTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023 Paul Colby <[email protected]>
1+
// SPDX-FileCopyrightText: 2023-2024 Paul Colby <[email protected]>
22
// SPDX-License-Identifier: GPL-3.0-or-later
33

44
package au.id.colby.nfcquicksettings

app/src/main/java/au/id/colby/nfcquicksettings/NfcTileService.kt

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023 Paul Colby <[email protected]>
1+
// SPDX-FileCopyrightText: 2023-2024 Paul Colby <[email protected]>
22
// SPDX-License-Identifier: GPL-3.0-or-later
33

44
package au.id.colby.nfcquicksettings
@@ -14,18 +14,19 @@ import android.provider.Settings
1414
import android.service.quicksettings.Tile
1515
import android.service.quicksettings.TileService
1616
import android.util.Log
17-
import au.id.colby.nfcquicksettings.R.*
17+
import au.id.colby.nfcquicksettings.R.string
1818
import java.util.Timer
1919
import kotlin.concurrent.fixedRateTimer
2020

21+
private const val TAG = "NfcTileService"
22+
2123
/**
2224
* A custom Quick Settings tile for NFC.
2325
*
2426
* The tile shows the current NFC status (On, Off, or Unavailable), and when clicked, starts the
2527
* device's NFC Settings activity.
2628
*/
2729
class NfcTileService : TileService() {
28-
private val TAG = "NfcTileService"
2930
private var updateTimer: Timer? = null
3031

3132
/**
@@ -44,7 +45,7 @@ class NfcTileService : TileService() {
4445
Log.d(TAG, "Updating tile")
4546
state = if (adapter == null) Tile.STATE_INACTIVE else
4647
if (adapter.isEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE
47-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) subtitle = getText(
48+
if (SDK_INT >= Build.VERSION_CODES.Q) subtitle = getText(
4849
if (adapter == null) string.tile_subtitle_unavailable else
4950
if (adapter.isEnabled) string.tile_subtitle_active else string.tile_subtitle_inactive
5051
)
@@ -78,6 +79,7 @@ class NfcTileService : TileService() {
7879
Log.d(TAG, "onClick")
7980
val intent = Intent(Settings.ACTION_NFC_SETTINGS)
8081
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
82+
//noinspection StartActivityAndCollapseDeprecated
8183
if (SDK_INT < UPSIDE_DOWN_CAKE) @Suppress("DEPRECATION") startActivityAndCollapse(intent)
8284
else startActivityAndCollapse(PendingIntent.getActivity(this, 0, intent, FLAG_IMMUTABLE))
8385
}

app/src/test/java/au/id/colby/nfcquicksettings/ExampleUnitTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023 Paul Colby <[email protected]>
1+
// SPDX-FileCopyrightText: 2023-2024 Paul Colby <[email protected]>
22
// SPDX-License-Identifier: GPL-3.0-or-later
33

44
package au.id.colby.nfcquicksettings
@@ -13,7 +13,7 @@ import org.junit.Assert.*
1313
* See [testing documentation](http://d.android.com/tools/testing).
1414
*/
1515
class ExampleUnitTest {
16-
/** Example test, not doing anything meanigful yet. */
16+
/** Example test, not doing anything meaningful yet. */
1717
@Test
1818
fun addition_isCorrect() {
1919
assertEquals(4, 2 + 2)

build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
plugins {
33
id 'com.android.application' version '8.1.3' apply false
44
id 'com.android.library' version '8.1.3' apply false
5+
id 'com.android.application' version '8.2.2' apply false
6+
id 'com.android.library' version '8.2.2' apply false
57
id 'com.github.ben-manes.versions' version '0.49.0'
68
id 'org.jetbrains.dokka' version '1.9.10' apply false
7-
id 'org.jetbrains.kotlin.android' version '1.9.20' apply false
9+
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
810
}

0 commit comments

Comments
 (0)