Skip to content

Commit d7a79be

Browse files
authored
Merge pull request #122 from SecUSo/development
Update to version 1.2.0
2 parents 7d31d02 + e06a533 commit d7a79be

File tree

60 files changed

+2406
-1504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2406
-1504
lines changed

.github/workflows/changelog.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Changelog Generation
22

33
on:
44
release:
5-
types: [published, released]
5+
types: [published]
66
workflow_dispatch:
77

88
jobs:
@@ -16,6 +16,7 @@ jobs:
1616
- uses: rhysd/changelog-from-release/action@v3
1717
with:
1818
file: CHANGELOG.md
19+
pull_request: true
1920
github_token: ${{ secrets.GITHUB_TOKEN }}
2021
commit_summary_template: 'update changelog for %s changes'
2122
args: -l 2

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Continuous Integration
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-20.04
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
with:
11+
submodules: "recursive"
12+
13+
- name: Set up JDK environment
14+
uses: actions/setup-java@v3
15+
with:
16+
distribution: "zulu"
17+
java-version: 17
18+
19+
- name: Make gradlew executable
20+
run: chmod +x ./gradlew
21+
22+
- name: Setup Gradle
23+
uses: gradle/gradle-build-action@v2
24+
25+
- name: Run local unit tests
26+
run: bash ./gradlew test --stacktrace
27+
28+
build:
29+
runs-on: ubuntu-20.04
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
with:
34+
submodules: "recursive"
35+
36+
- name: Set up JDK environment
37+
uses: actions/setup-java@v3
38+
with:
39+
distribution: "zulu"
40+
java-version: 17
41+
42+
- name: Make gradlew executable
43+
run: chmod +x ./gradlew
44+
45+
- name: Setup Gradle
46+
uses: gradle/gradle-build-action@v2
47+
48+
- name: Run lint check
49+
run: bash ./gradlew lint
50+
51+
- name: Upload lint result
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: lint-results-debug
55+
path: app/build/reports/lint-results-debug.html
56+
57+
- name: Build the app
58+
run: bash ./gradlew build --stacktrace
59+
60+
- name: Build debug apk
61+
run: bash ./gradlew assembleDebug
62+
63+
- name: Upload debug apk
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: debug-apk
67+
path: app/build/outputs/apk/debug/*.apk

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@ local.properties
2626
.Trashes
2727
ehthumbs.db
2828
Thumbs.db
29+
30+
# Documents
31+
*.pdf
32+
*.doc
33+
*.docx
34+
*.odt
35+
36+
# APKs
37+
*.apk
38+
/pfa.properties
39+
/.idea/
40+
/app/release

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[![PFA](https://img.shields.io/static/v1?label=Privacy%20Friendly%20Apps&message=Project%20Page&style=flat-square&color=3680BB&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1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roQf+aASYNTk7DhcF+PYcVWwL/glBMAAvuDzBqAOvML/Vx4fwNbAl4vV6dEjiGap9NALodCm1DnXDHRBfn5DLh5KFVABwXkobnvhB9gFdg080Jf2AK510490kjHlIEVeWG/DOLBj6NbpKmwKVQNXZmVOudU7s/4y+Bg5XNqRM6t23VMMXlqzmU9cjQa5s7I/zj2jrGmDk/ABru4btF2dm2JbYlUFbW6WzwPXmuM54oXSZOCg0vLxbk5FU0ruU6uSfdJpjY1xh35IrjhZv7T9TdrMfDLEeGfsD4ueI9GQekJbDVQHw8ceJE86RpgxMi/Ewnc4QjADwGPCqoC4TOSYJwBoCnQNDY6XMgtBLw+YhGKQxK0wYA8RmtExxvcV8z4bSAh9AX4qCvhU74S+EMgHJ4I1WToG2YXnh+fv/7kfXSFChO0BJiw6+3V+4bEduw4lqypqu2gnIpykBN8bZnhn72bHv48IywFGp9cQFly2LjuzMzE8VpGTIE/gOwNDO/UtO07dIWAFBVAXr0xY3T9al7axcPM34J1y5WhgW4Jq/iZs/w3irPG6q+8iRLB1pqn5xxQmlpYfby29IhsNVAVVWTe9Tvz/Nr+kKrjKvq4jFd3W/0+aDqW9CXOqbpi6yCvvSJIWea0cd4OC7VarwFWQRSdI0VGHErQbsAbyQ/2xmOyQbck20w+BISY4MKyyQ48rOH/TVCLwE88/EzJarxxYFNCGsKKOBrSoAFNyV4kwjAlkBRUfZYhEupxI54EbEK6Y32eGqNPvM9EU143e7AIuu1ikLp1SgP3Df6GNWOvnZ8nEV4G75Rq0V8mmlMCPkGEv2I2wFovg8AAAAASUVORK5CYII=)][PFA]
2-
[![Twitter](https://img.shields.io/badge/twitter-@SECUSOResearch-%231DA1F2.svg?&style=flat-square&logo=twitter&logoColor=1DA1F2)][Twitter]
2+
[![Bluesky](https://img.shields.io/badge/[email protected]-%231DA1F2.svg?&style=flat-square&logo=twitter&logoColor=1DA1F2)][Bluesky]
33
[![Mastodon](https://img.shields.io/badge/mastodon-@SECUSO__Research@baw%C3%BC.social-%233088D4.svg?&style=flat-square&logo=mastodon&logoColor=3088D4)][Mastodon]
44
[![Translation status](https://hosted.weblate.org/widget/pfa/shopping-list/shopping-list-android-app/svg-badge.svg)](https://hosted.weblate.org/engage/pfa/)
55

66
[PFA]: https://secuso.org/pfa
77
[Mastodon]: https://xn--baw-joa.social/@SECUSO_Research
8-
[Twitter]: https://twitter.com/SECUSOResearch
8+
[Bluesky]: https://bsky.app/profile/secusoresearch.bsky.social
99
<img src="https://raw.githubusercontent.com/SecUSo/privacy-friendly-shopping-list/master/fastlane/metadata/android/en-US/images/website_icon.png"
1010
alt="Privacy Friendly Notes Icon"
1111
width="120px"

app/build.gradle

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-parcelize'
34

45
android {
5-
compileSdkVersion 33
6-
6+
namespace "privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist"
77
defaultConfig {
88
applicationId "privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist"
9-
minSdkVersion 17
10-
targetSdkVersion 33
11-
versionCode 8
12-
versionName "1.1"
9+
minSdkVersion 19
10+
compileSdk 34
11+
targetSdkVersion 34
12+
versionCode 10
13+
versionName "1.2.0-rc1"
1314
multiDexEnabled true
15+
16+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1417
}
1518

1619
buildTypes {
@@ -21,8 +24,16 @@ android {
2124
}
2225

2326
compileOptions {
24-
sourceCompatibility JavaVersion.VERSION_1_8
25-
targetCompatibility JavaVersion.VERSION_1_8
27+
sourceCompatibility JavaVersion.VERSION_17
28+
targetCompatibility JavaVersion.VERSION_17
29+
}
30+
31+
kotlinOptions {
32+
jvmTarget = JavaVersion.VERSION_17.toString()
33+
}
34+
35+
kotlin {
36+
jvmToolchain {17}
2637
}
2738

2839
testOptions {
@@ -53,14 +64,14 @@ android {
5364
]
5465
}
5566
}
56-
5767
lint {
5868
lintConfig = file("lint.xml")
5969
}
70+
namespace 'privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist'
6071
}
6172

62-
android.applicationVariants.all { variant ->
63-
variant.outputs.all {
73+
android.applicationVariants.configureEach { variant ->
74+
variant.outputs.configureEach {
6475
def appName = "pfa-shopping-list"
6576
outputFileName = appName + "-${variant.name}-v${variant.versionName}.apk"
6677
}
@@ -69,19 +80,21 @@ android.applicationVariants.all { variant ->
6980
dependencies {
7081
implementation fileTree(include: ['*.jar'], dir: 'libs')
7182
// android
72-
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
7383

74-
implementation 'androidx.appcompat:appcompat:1.5.1'
75-
implementation 'com.google.android.material:material:1.6.1'
84+
implementation 'androidx.appcompat:appcompat:1.6.1'
85+
implementation 'com.google.android.material:material:1.11.0'
7686
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
77-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
87+
implementation 'androidx.preference:preference-ktx:1.2.1'
88+
implementation 'androidx.recyclerview:recyclerview:1.3.2'
7889
implementation 'androidx.cardview:cardview:1.0.0'
7990

8091
// tests
81-
testImplementation 'junit:junit:4.12'
92+
testImplementation 'junit:junit:4.13.2'
8293
testImplementation 'org.mockito:mockito-core:2.7.6'
83-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
84-
androidTestImplementation 'androidx.test:rules:1.1.1'
94+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
95+
androidTestImplementation 'androidx.test:rules:1.6.1'
96+
androidTestImplementation 'androidx.test:core:1.6.1'
97+
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
8598
testImplementation 'pl.pragmatists:JUnitParams:0.3.6'
8699
// dependency injection
87100
implementation 'com.squareup.dagger:dagger:1.2.5'
@@ -100,17 +113,17 @@ dependencies {
100113
// image zoom
101114
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
102115

103-
implementation 'androidx.sqlite:sqlite:2.3.0'
104-
implementation 'androidx.sqlite:sqlite-ktx:2.3.0'
116+
implementation 'androidx.sqlite:sqlite:2.4.0'
117+
implementation 'androidx.sqlite:sqlite-ktx:2.4.0'
105118

106119
// Backup API
107120
implementation project(':backup-api')
108-
def work_version = '2.7.1'
121+
def work_version = '2.9.0'
109122
implementation "androidx.work:work-runtime:$work_version"
110123
implementation "androidx.work:work-runtime-ktx:$work_version"
111124
androidTestImplementation "androidx.work:work-testing:$work_version"
112125

113-
implementation 'androidx.core:core-ktx:1.7.20'
126+
implementation "androidx.core:core-ktx:1.9.0"
114127

115128
// Multi-Dex
116129
def multidex_version = "2.0.1"

app/lint.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<lint>
3+
<!-- Disable the NotificationPermission check for glide -->
4+
<issue id="NotificationPermission">
5+
<ignore regexp="com.bumptech.glide.request.target.NotificationTarget" />
6+
</issue>
7+
38
<!-- Set the severity of missing translations to warning instead of error -->
49
<issue id="MissingTranslation" severity="warning" />
510
<issue id="MissingQuantity" severity="warning" />
6-
</lint>
11+
</lint>
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist;
22

3-
import android.support.test.runner.AndroidJUnit4;
4-
import android.test.AndroidTestCase;
3+
import androidx.test.ext.junit.runners.AndroidJUnit4;
4+
import androidx.test.platform.app.InstrumentationRegistry;
5+
6+
import org.junit.After;
7+
import org.junit.Before;
58
import org.junit.runner.RunWith;
9+
610
import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.framework.persistence.DB;
711

812
/**
@@ -11,24 +15,22 @@
1115
* Created: 31.05.16 creation date
1216
*/
1317
@RunWith(AndroidJUnit4.class)
14-
abstract public class AbstractDatabaseTest extends AndroidTestCase
15-
{
18+
abstract public class AbstractDatabaseTest {
1619

17-
protected void setUp() throws Exception
18-
{
19-
super.setUp();
20+
@Before
21+
public void setUp() throws Exception {
2022
// delete database before each test
21-
getContext().deleteDatabase(DB.TEST.getDbName());
23+
InstrumentationRegistry.getInstrumentation().getContext().deleteDatabase(DB.TEST.getDbName());
2224
setupBeforeEachTest();
2325
}
2426

25-
protected void tearDown() throws Exception
26-
{
27-
super.tearDown();
27+
@After
28+
public void tearDown() throws Exception {
2829
cleanAfterEachTest();
2930
}
3031

3132
abstract protected void setupBeforeEachTest();
3233

33-
protected void cleanAfterEachTest(){}
34+
protected void cleanAfterEachTest() {
35+
}
3436
}
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist;
22

3-
import android.app.Application;
4-
import android.test.ApplicationTestCase;
3+
import static org.junit.Assert.assertEquals;
4+
5+
import androidx.test.core.app.ApplicationProvider;
6+
import androidx.test.ext.junit.runners.AndroidJUnit4;
7+
import androidx.test.platform.app.InstrumentationRegistry;
8+
9+
import org.junit.Test;
10+
import org.junit.runner.RunWith;
511

612
/**
713
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
814
*/
9-
public class ApplicationTest extends ApplicationTestCase<Application>
10-
{
11-
public ApplicationTest()
12-
{
13-
super(Application.class);
15+
@RunWith(AndroidJUnit4.class)
16+
public class ApplicationTest {
17+
@Test
18+
public void useApplicationContext() {
19+
assertEquals("privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist", ApplicationProvider.getApplicationContext().getPackageName());
20+
}
21+
22+
@Test
23+
public void useContext() {
24+
assertEquals("privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.test", InstrumentationRegistry.getInstrumentation().getContext().getPackageName());
1425
}
1526
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist
2+
3+
import androidx.test.espresso.Espresso.onView
4+
import androidx.test.espresso.action.ViewActions.click
5+
import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
6+
import androidx.test.ext.junit.rules.ActivityScenarioRule
7+
import androidx.test.ext.junit.runners.AndroidJUnit4
8+
import org.junit.Rule
9+
import org.junit.Test
10+
import org.junit.runner.RunWith
11+
import privacyfriendlyshoppinglist.secuso.org.privacyfriendlyshoppinglist.ui.main.MainActivity
12+
13+
@RunWith(AndroidJUnit4::class)
14+
class MainActivityBasicTest {
15+
@get: Rule
16+
var mActivityRule = ActivityScenarioRule(MainActivity::class.java)
17+
18+
@Test
19+
fun launchActivity() {
20+
}
21+
22+
@Test
23+
fun openDrawer() {
24+
onView(withContentDescription(R.string.navigation_drawer_open)).perform(click())
25+
}
26+
}

0 commit comments

Comments
 (0)