diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69ae597df..bd4bdaf3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ workflow: - test -e $cmdline_tools_latest && export PATH="$cmdline_tools_latest:$PATH" - export GRADLE_USER_HOME=$PWD/.gradle - - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` + - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdk\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` - echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null # index-v1.jar tests need SHA1 support still, TODO use apksig to validate JAR sigs - sed -i 's,SHA1 denyAfter 20[0-9][0-9],SHA1 denyAfter 2026,' @@ -206,7 +206,7 @@ libs database schema: - apt-get update - apt-get -qy --no-install-recommends install default-jdk-headless git sdkmanager - export ANDROID_HOME=/opt/android-sdk - - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` + - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdk\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` - sdkmanager "platforms;android-$ANDROID_COMPILE_SDK" "build-tools;30.0.3" - ./gradlew :libs:database:kaptDebugKotlin - git --no-pager diff --exit-code diff --git a/app/build.gradle b/app/build.gradle index aaf0a718a..fdb96f827 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,9 +23,10 @@ def getVersionName = { -> def privilegedExtensionApplicationId = '"org.fdroid.fdroid.privileged"' android { - buildToolsVersion "33.0.2" + namespace "org.fdroid.fdroid" + buildToolsVersion "34.0.0" - compileSdkVersion 33 + compileSdk 34 defaultConfig { versionCode 1019050 @@ -93,8 +94,8 @@ android { compileOptions { compileOptions.encoding = "UTF-8" - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } aaptOptions { @@ -102,11 +103,13 @@ android { } buildFeatures { + buildConfig true compose true + aidl true } composeOptions { - kotlinCompilerExtensionVersion = "1.4.6" + kotlinCompilerExtensionVersion = "1.5.8" } testOptions { @@ -202,7 +205,6 @@ dependencies { fullImplementation 'org.jmdns:jmdns:3.5.5' fullImplementation 'org.nanohttpd:nanohttpd:2.3.1' - // upgrading this requires compileSdk 34 and thus gradle 8 implementation platform('androidx.compose:compose-bom:2023.06.01') implementation 'androidx.compose.material:material' implementation 'androidx.compose.material:material-icons-extended' diff --git a/app/src/full/java/org/fdroid/fdroid/nearby/SwapWorkflowActivity.java b/app/src/full/java/org/fdroid/fdroid/nearby/SwapWorkflowActivity.java index 19c30180a..f0b827778 100644 --- a/app/src/full/java/org/fdroid/fdroid/nearby/SwapWorkflowActivity.java +++ b/app/src/full/java/org/fdroid/fdroid/nearby/SwapWorkflowActivity.java @@ -205,50 +205,40 @@ public class SwapWorkflowActivity extends AppCompatActivity { */ public void onToolbarBackPressed() { int nextStep = R.layout.swap_start_swap; - switch (currentView.getLayoutResId()) { - case R.layout.swap_confirm_receive: - nextStep = backstack.peek(); - break; - case R.layout.swap_connecting: - nextStep = R.layout.swap_select_apps; - break; - case R.layout.swap_join_wifi: + if (currentView.getLayoutResId() == R.layout.swap_confirm_receive) { + nextStep = backstack.peek(); + } else if (currentView.getLayoutResId() == R.layout.swap_connecting) { + nextStep = R.layout.swap_select_apps; + } else if (currentView.getLayoutResId() == R.layout.swap_join_wifi) { + nextStep = R.layout.swap_start_swap; + } else if (currentView.getLayoutResId() == R.layout.swap_nfc) { + nextStep = R.layout.swap_join_wifi; + } else if (currentView.getLayoutResId() == R.layout.swap_select_apps) { + if (!backstack.isEmpty() && backstack.peek() == R.layout.swap_start_swap) { nextStep = R.layout.swap_start_swap; - break; - case R.layout.swap_nfc: + } else if (getSwapService() != null && getSwapService().isConnectingWithPeer()) { + nextStep = R.layout.swap_success; + } else { nextStep = R.layout.swap_join_wifi; - break; - case R.layout.swap_select_apps: - if (!backstack.isEmpty() && backstack.peek() == R.layout.swap_start_swap) { - nextStep = R.layout.swap_start_swap; - } else if (getSwapService() != null && getSwapService().isConnectingWithPeer()) { - nextStep = R.layout.swap_success; - } else { - nextStep = R.layout.swap_join_wifi; - } - break; - case R.layout.swap_send_fdroid: + } + } else if (currentView.getLayoutResId() == R.layout.swap_send_fdroid) { + nextStep = R.layout.swap_start_swap; + } else if (currentView.getLayoutResId() == R.layout.swap_start_swap) { + if (getSwapService() != null && getSwapService().isConnectingWithPeer()) { + nextStep = R.layout.swap_success; + } else { + SwapService.stop(this); + finish(); + return; + } + } else if (currentView.getLayoutResId() == R.layout.swap_success) { + nextStep = R.layout.swap_start_swap; + } else if (currentView.getLayoutResId() == R.layout.swap_wifi_qr) { + if (!backstack.isEmpty() && backstack.peek() == R.layout.swap_start_swap) { nextStep = R.layout.swap_start_swap; - break; - case R.layout.swap_start_swap: - if (getSwapService() != null && getSwapService().isConnectingWithPeer()) { - nextStep = R.layout.swap_success; - } else { - SwapService.stop(this); - finish(); - return; - } - break; - case R.layout.swap_success: - nextStep = R.layout.swap_start_swap; - break; - case R.layout.swap_wifi_qr: - if (!backstack.isEmpty() && backstack.peek() == R.layout.swap_start_swap) { - nextStep = R.layout.swap_start_swap; - } else { - nextStep = R.layout.swap_join_wifi; - } - break; + } else { + nextStep = R.layout.swap_join_wifi; + } } currentSwapViewLayoutRes = nextStep; inflateSwapView(currentSwapViewLayoutRes); @@ -302,28 +292,27 @@ public class SwapWorkflowActivity extends AppCompatActivity { menu.clear(); MenuInflater menuInflater = getMenuInflater(); - switch (currentView.getLayoutResId()) { - case R.layout.swap_select_apps: - menuInflater.inflate(R.menu.swap_next_search, menu); - if (getSwapService().isConnectingWithPeer()) { - setUpNextButton(menu, R.string.next, R.drawable.ic_nearby); - } else { - setUpNextButton(menu, R.string.next, null); - } - setUpSearchView(menu); - return true; - case R.layout.swap_success: - menuInflater.inflate(R.menu.swap_search, menu); - setUpSearchView(menu); - return true; - case R.layout.swap_join_wifi: - menuInflater.inflate(R.menu.swap_next, menu); - setUpNextButton(menu, R.string.next, R.drawable.ic_arrow_forward); - return true; - case R.layout.swap_nfc: - menuInflater.inflate(R.menu.swap_next, menu); - setUpNextButton(menu, R.string.skip, R.drawable.ic_arrow_forward); - return true; + if (currentView.getLayoutResId() == R.layout.swap_select_apps) { + menuInflater.inflate(R.menu.swap_next_search, menu); + if (getSwapService().isConnectingWithPeer()) { + setUpNextButton(menu, R.string.next, R.drawable.ic_nearby); + } else { + setUpNextButton(menu, R.string.next, null); + } + setUpSearchView(menu); + return true; + } else if (currentView.getLayoutResId() == R.layout.swap_success) { + menuInflater.inflate(R.menu.swap_search, menu); + setUpSearchView(menu); + return true; + } else if (currentView.getLayoutResId() == R.layout.swap_join_wifi) { + menuInflater.inflate(R.menu.swap_next, menu); + setUpNextButton(menu, R.string.next, R.drawable.ic_arrow_forward); + return true; + } else if (currentView.getLayoutResId() == R.layout.swap_nfc) { + menuInflater.inflate(R.menu.swap_next, menu); + setUpNextButton(menu, R.string.skip, R.drawable.ic_arrow_forward); + return true; } return super.onPrepareOptionsMenu(menu); @@ -349,16 +338,12 @@ public class SwapWorkflowActivity extends AppCompatActivity { private void sendNext() { int currentLayoutResId = currentView.getLayoutResId(); - switch (currentLayoutResId) { - case R.layout.swap_select_apps: - onAppsSelected(); - break; - case R.layout.swap_join_wifi: - inflateSwapView(R.layout.swap_select_apps); - break; - case R.layout.swap_nfc: - inflateSwapView(R.layout.swap_wifi_qr); - break; + if (currentLayoutResId == R.layout.swap_select_apps) { + onAppsSelected(); + } else if (currentLayoutResId == R.layout.swap_join_wifi) { + inflateSwapView(R.layout.swap_select_apps); + } else if (currentLayoutResId == R.layout.swap_nfc) { + inflateSwapView(R.layout.swap_wifi_qr); } } @@ -422,10 +407,8 @@ public class SwapWorkflowActivity extends AppCompatActivity { newIntent = false; } - switch (currentSwapViewLayoutRes) { - case R.layout.swap_start_swap: - updateWifiBannerVisibility(); - break; + if (currentSwapViewLayoutRes == R.layout.swap_start_swap) { + updateWifiBannerVisibility(); } } @@ -541,20 +524,18 @@ public class SwapWorkflowActivity extends AppCompatActivity { return; } - switch (currentSwapViewLayoutRes) { - case R.layout.swap_start_swap: - showIntro(); - return; - case R.layout.swap_nfc: - if (!attemptToShowNfc()) { - inflateSwapView(R.layout.swap_wifi_qr); - return; - } - break; - case R.layout.swap_connecting: - // TODO: Properly decide what to do here (i.e. returning to the activity after it was connecting)... - inflateSwapView(R.layout.swap_start_swap); + if (currentSwapViewLayoutRes == R.layout.swap_start_swap) { + showIntro(); + return; + } else if (currentSwapViewLayoutRes == R.layout.swap_nfc) { + if (!attemptToShowNfc()) { + inflateSwapView(R.layout.swap_wifi_qr); return; + } + } else if (currentSwapViewLayoutRes == R.layout.swap_connecting) { + // TODO: Properly decide what to do here (i.e. returning to the activity after it was connecting)... + inflateSwapView(R.layout.swap_start_swap); + return; } inflateSwapView(currentSwapViewLayoutRes); } @@ -562,10 +543,8 @@ public class SwapWorkflowActivity extends AppCompatActivity { public void inflateSwapView(@LayoutRes int viewRes) { inflateSwapView(viewRes, false); - switch (viewRes) { - case R.layout.swap_start_swap: - updateWifiBannerVisibility(); - break; + if (viewRes == R.layout.swap_start_swap) { + updateWifiBannerVisibility(); } } @@ -596,21 +575,19 @@ public class SwapWorkflowActivity extends AppCompatActivity { getSwapService().initTimer(); if (!backPressed) { - switch (currentSwapViewLayoutRes) { - case R.layout.swap_connecting: - case R.layout.swap_confirm_receive: - // do not add to backstack - break; - default: - if (backstack.isEmpty()) { - if (viewRes != R.layout.swap_start_swap) { - backstack.push(currentSwapViewLayoutRes); - } - } else { - if (backstack.peek() != currentSwapViewLayoutRes) { - backstack.push(currentSwapViewLayoutRes); - } + if (currentSwapViewLayoutRes == R.layout.swap_connecting || + currentSwapViewLayoutRes == R.layout.swap_confirm_receive) { + // do not add to backstack + } else { + if (backstack.isEmpty()) { + if (viewRes != R.layout.swap_start_swap) { + backstack.push(currentSwapViewLayoutRes); } + } else { + if (backstack.peek() != currentSwapViewLayoutRes) { + backstack.push(currentSwapViewLayoutRes); + } + } } } @@ -624,45 +601,37 @@ public class SwapWorkflowActivity extends AppCompatActivity { toolbar.setTitle(currentView.getToolbarTitle()); toolbar.setNavigationOnClickListener(v -> onToolbarBackPressed()); toolbar.setNavigationOnClickListener(v -> { - switch (currentView.getLayoutResId()) { - case R.layout.swap_start_swap: - SwapService.stop(this); - finish(); - return; - default: - currentSwapViewLayoutRes = R.layout.swap_start_swap; + if (currentView.getLayoutResId() == R.layout.swap_start_swap) { + SwapService.stop(this); + finish(); + return; + } else { + currentSwapViewLayoutRes = R.layout.swap_start_swap; } inflateSwapView(currentSwapViewLayoutRes); }); if (viewRes == R.layout.swap_start_swap) { toolbar.setNavigationIcon(R.drawable.ic_close); } else { - toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material); + toolbar.setNavigationIcon(R.drawable.ic_arrow_back); } container.addView(view); supportInvalidateOptionsMenu(); - switch (currentView.getLayoutResId()) { - case R.layout.swap_send_fdroid: - setUpFromWifi(); - setUpUseBluetoothButton(); - break; - case R.layout.swap_wifi_qr: - setUpFromWifi(); - setUpQrScannerButton(); - break; - case R.layout.swap_nfc: - setUpNfcView(); - break; - case R.layout.swap_select_apps: - LocalRepoService.create(this, getSwapService().getAppsToSwap()); - break; - case R.layout.swap_connecting: - setUpConnectingView(); - break; - case R.layout.swap_start_swap: - setUpStartVisibility(); - break; + if (currentView.getLayoutResId() == R.layout.swap_send_fdroid) { + setUpFromWifi(); + setUpUseBluetoothButton(); + } else if (currentView.getLayoutResId() == R.layout.swap_wifi_qr) { + setUpFromWifi(); + setUpQrScannerButton(); + } else if (currentView.getLayoutResId() == R.layout.swap_nfc) { + setUpNfcView(); + } else if (currentView.getLayoutResId() == R.layout.swap_select_apps) { + LocalRepoService.create(this, getSwapService().getAppsToSwap()); + } else if (currentView.getLayoutResId() == R.layout.swap_connecting) { + setUpConnectingView(); + } else if (currentView.getLayoutResId() == R.layout.swap_start_swap) { + setUpStartVisibility(); } } @@ -1046,40 +1015,37 @@ public class SwapWorkflowActivity extends AppCompatActivity { } String qrUriString = null; - switch (currentView.getLayoutResId()) { - case R.layout.swap_join_wifi: - setUpJoinWifi(); - return; - case R.layout.swap_send_fdroid: - qrUriString = buttonLabel; - break; - case R.layout.swap_wifi_qr: - Uri sharingUri = Utils.getSharingUri(FDroidApp.repo); - StringBuilder qrUrlBuilder = new StringBuilder(scheme); - qrUrlBuilder.append(sharingUri.getHost()); - if (sharingUri.getPort() != 80) { - qrUrlBuilder.append(':'); - qrUrlBuilder.append(sharingUri.getPort()); - } - qrUrlBuilder.append(sharingUri.getPath()); - boolean first = true; + if (currentView.getLayoutResId() == R.layout.swap_join_wifi) { + setUpJoinWifi(); + return; + } else if (currentView.getLayoutResId() == R.layout.swap_send_fdroid) { + qrUriString = buttonLabel; + } else if (currentView.getLayoutResId() == R.layout.swap_wifi_qr) { + Uri sharingUri = Utils.getSharingUri(FDroidApp.repo); + StringBuilder qrUrlBuilder = new StringBuilder(scheme); + qrUrlBuilder.append(sharingUri.getHost()); + if (sharingUri.getPort() != 80) { + qrUrlBuilder.append(':'); + qrUrlBuilder.append(sharingUri.getPort()); + } + qrUrlBuilder.append(sharingUri.getPath()); + boolean first = true; - Set names = sharingUri.getQueryParameterNames(); - for (String name : names) { - if (!"ssid".equals(name)) { - if (first) { - qrUrlBuilder.append('?'); - first = false; - } else { - qrUrlBuilder.append('&'); - } - qrUrlBuilder.append(name); - qrUrlBuilder.append('='); - qrUrlBuilder.append(sharingUri.getQueryParameter(name)); + Set names = sharingUri.getQueryParameterNames(); + for (String name : names) { + if (!"ssid".equals(name)) { + if (first) { + qrUrlBuilder.append('?'); + first = false; + } else { + qrUrlBuilder.append('&'); } + qrUrlBuilder.append(name); + qrUrlBuilder.append('='); + qrUrlBuilder.append(sharingUri.getQueryParameter(name)); } - qrUriString = qrUrlBuilder.toString(); - break; + } + qrUriString = qrUrlBuilder.toString(); } ImageView qrImage = container.findViewById(R.id.wifi_qr_code); diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3fedf08e6..483c294d8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,7 +24,6 @@ --> { @Override public AppCardController onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { int layout; - switch (viewType) { - case R.id.latest_large_tile: - layout = R.layout.app_card_large; - break; - case R.id.latest_small_tile: - layout = R.layout.app_card_horizontal; - break; - case R.id.latest_regular_list: - layout = R.layout.app_card_list_item; - break; - default: - throw new IllegalArgumentException("Unknown view type when rendering \"What's New\": " + viewType); + if (viewType == R.id.latest_large_tile) { + layout = R.layout.app_card_large; + } else if (viewType == R.id.latest_small_tile) { + layout = R.layout.app_card_horizontal; + } else if (viewType == R.id.latest_regular_list) { + layout = R.layout.app_card_list_item; + } else { + throw new IllegalArgumentException("Unknown view type when rendering \"What's New\": " + viewType); } return new AppCardController(activity, activity.getLayoutInflater().inflate(layout, parent, false)); diff --git a/app/src/main/java/org/fdroid/fdroid/views/main/MainViewAdapter.java b/app/src/main/java/org/fdroid/fdroid/views/main/MainViewAdapter.java index 9b59b34da..7c9b990ed 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/main/MainViewAdapter.java +++ b/app/src/main/java/org/fdroid/fdroid/views/main/MainViewAdapter.java @@ -87,25 +87,19 @@ class MainViewAdapter extends RecyclerView.Adapter { @Override public MainViewController onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { MainViewController holder = createEmptyView(activity); - switch (viewType) { - case R.id.latest: - holder.bindLatestView(); - break; - case R.id.categories: - holder.bindCategoriesView(); - break; - case R.id.nearby: - holder.bindSwapView(); - break; - case R.id.updates: - // Hold of until onViewAttachedToWindow, because that is where we want to start listening - // for broadcast events (which is what the data binding does). - break; - case R.id.settings: - holder.bindSettingsView(); - break; - default: - throw new IllegalStateException("Unknown view type " + viewType); + if (viewType == R.id.latest) { + holder.bindLatestView(); + } else if (viewType == R.id.categories) { + holder.bindCategoriesView(); + } else if (viewType == R.id.nearby) { + holder.bindSwapView(); + } else if (viewType == R.id.updates) { + // Hold of until onViewAttachedToWindow, because that is where we want to start listening + // for broadcast events (which is what the data binding does). + } else if (viewType == R.id.settings) { + holder.bindSettingsView(); + } else { + throw new IllegalStateException("Unknown view type " + viewType); } return holder; } diff --git a/app/src/main/java/org/fdroid/fdroid/views/repos/RepoDetailsActivity.java b/app/src/main/java/org/fdroid/fdroid/views/repos/RepoDetailsActivity.java index 79aecdda6..f90994cd2 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/repos/RepoDetailsActivity.java +++ b/app/src/main/java/org/fdroid/fdroid/views/repos/RepoDetailsActivity.java @@ -279,23 +279,23 @@ public class RepoDetailsActivity extends AppCompatActivity { @Override public boolean onOptionsItemSelected(MenuItem item) { Intent intent; - switch (item.getItemId()) { - case android.R.id.home: - NavUtils.navigateUpFromSameTask(this); - return true; - case R.id.menu_delete: - promptForDelete(); - return true; - case R.id.menu_enable_nfc: - intent = new Intent(this, NfcNotEnabledActivity.class); - startActivity(intent); - return true; - case R.id.action_share: - intent = new Intent(Intent.ACTION_SEND); - intent.setType("text/plain"); - intent.putExtra(Intent.EXTRA_TEXT, shareUrl); - startActivity(Intent.createChooser(intent, - getResources().getString(R.string.share_repository))); + int itemId = item.getItemId(); + if (itemId == android.R.id.home) { + NavUtils.navigateUpFromSameTask(this); + return true; + } else if (itemId == R.id.menu_delete) { + promptForDelete(); + return true; + } else if (itemId == R.id.menu_enable_nfc) { + intent = new Intent(this, NfcNotEnabledActivity.class); + startActivity(intent); + return true; + } else if (itemId == R.id.action_share) { + intent = new Intent(Intent.ACTION_SEND); + intent.setType("text/plain"); + intent.putExtra(Intent.EXTRA_TEXT, shareUrl); + startActivity(Intent.createChooser(intent, + getResources().getString(R.string.share_repository))); } return super.onOptionsItemSelected(item); @@ -318,7 +318,7 @@ public class RepoDetailsActivity extends AppCompatActivity { } boolean needsEnableNfcMenuItem; - needsEnableNfcMenuItem = !nfcAdapter.isNdefPushEnabled(); + needsEnableNfcMenuItem = false; // TODO remove NFC code menuItem.setVisible(needsEnableNfcMenuItem); } diff --git a/build.gradle b/build.gradle index 9209ef035..c5e90194d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,9 +4,9 @@ buildscript { maven { url 'https://maven.google.com/' } } dependencies { - classpath 'com.android.tools.build:gradle:7.4.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10" + classpath 'com.android.tools.build:gradle:8.2.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22" + classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.9.10" classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0' } } diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 439ac43ca..8511337ce 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -1,5 +1,5 @@ - + false false @@ -9,174 +9,174 @@ - - - + + + - - - - - + + + + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - + - - + + - - - - - - - - - + + + + + + + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - + - - - - + + + + - - + + - - + + - + - - - - - - - - + + + + + + + + - - + + @@ -466,6 +466,11 @@ + + + + + @@ -727,6 +732,11 @@ + + + + + @@ -755,6 +765,11 @@ + + + + + @@ -1399,6 +1414,11 @@ + + + + + @@ -1419,6 +1439,11 @@ + + + + + @@ -1439,6 +1464,11 @@ + + + + + @@ -1459,6 +1489,11 @@ + + + + + @@ -1479,6 +1514,11 @@ + + + + + @@ -1514,11 +1554,21 @@ + + + + + + + + + + @@ -1590,6 +1640,11 @@ + + + + + @@ -1610,6 +1665,11 @@ + + + + + @@ -1988,7 +2048,7 @@ - + @@ -2085,7 +2145,7 @@ - + @@ -2094,7 +2154,7 @@ - + @@ -2126,6 +2186,11 @@ + + + + + @@ -2154,6 +2219,11 @@ + + + + + @@ -2182,6 +2252,11 @@ + + + + + @@ -2210,6 +2285,11 @@ + + + + + @@ -2238,6 +2318,11 @@ + + + + + @@ -2266,11 +2351,21 @@ + + + + + + + + + + @@ -2299,6 +2394,11 @@ + + + + + @@ -2327,6 +2427,11 @@ + + + + + @@ -2355,6 +2460,11 @@ + + + + + @@ -2383,6 +2493,11 @@ + + + + + @@ -2411,6 +2526,11 @@ + + + + + @@ -2439,6 +2559,11 @@ + + + + + @@ -2467,6 +2592,11 @@ + + + + + @@ -2508,6 +2638,11 @@ + + + + + @@ -2546,6 +2681,11 @@ + + + + + @@ -2566,6 +2706,11 @@ + + + + + @@ -2594,6 +2739,11 @@ + + + + + @@ -2622,6 +2772,11 @@ + + + + + @@ -2650,6 +2805,11 @@ + + + + + @@ -2678,6 +2838,11 @@ + + + + + @@ -2706,6 +2871,11 @@ + + + + + @@ -2724,6 +2894,11 @@ + + + + + @@ -2762,6 +2937,11 @@ + + + + + @@ -2790,11 +2970,21 @@ + + + + + + + + + + @@ -2823,9 +3013,14 @@ + + + + + - + @@ -2896,6 +3091,11 @@ + + + + + @@ -2911,6 +3111,11 @@ + + + + + @@ -2939,6 +3144,11 @@ + + + + + @@ -2967,6 +3177,11 @@ + + + + + @@ -2995,6 +3210,11 @@ + + + + + @@ -3023,6 +3243,11 @@ + + + + + @@ -3051,6 +3276,11 @@ + + + + + @@ -3079,6 +3309,11 @@ + + + + + @@ -3107,6 +3342,11 @@ + + + + + @@ -3135,6 +3375,11 @@ + + + + + @@ -3168,6 +3413,11 @@ + + + + + @@ -3178,6 +3428,11 @@ + + + + + @@ -3193,6 +3448,11 @@ + + + + + @@ -3208,6 +3468,11 @@ + + + + + @@ -3223,6 +3488,11 @@ + + + + + @@ -3238,6 +3508,11 @@ + + + + + @@ -3253,6 +3528,11 @@ + + + + + @@ -3268,6 +3548,21 @@ + + + + + + + + + + + + + + + @@ -3283,6 +3578,11 @@ + + + + + @@ -3298,6 +3598,11 @@ + + + + + @@ -3313,6 +3618,11 @@ + + + + + @@ -3328,6 +3638,21 @@ + + + + + + + + + + + + + + + @@ -3343,6 +3668,16 @@ + + + + + + + + + + @@ -3358,6 +3693,11 @@ + + + + + @@ -3373,6 +3713,11 @@ + + + + + @@ -3388,6 +3733,11 @@ + + + + + @@ -3403,9 +3753,14 @@ + + + + + - + @@ -3414,12 +3769,12 @@ - + - + @@ -3428,7 +3783,7 @@ - + @@ -3683,13 +4038,13 @@ - + - + @@ -3703,7 +4058,7 @@ - + @@ -3757,13 +4112,13 @@ - + - + @@ -3805,7 +4160,7 @@ - + @@ -3816,13 +4171,13 @@ - + - + @@ -3849,7 +4204,7 @@ - + @@ -3865,7 +4220,7 @@ - + @@ -3899,7 +4254,7 @@ - + @@ -3957,22 +4312,27 @@ - + + + + + + - + - + @@ -3981,13 +4341,13 @@ - + - + @@ -4003,25 +4363,30 @@ - + + + + + + - + - + - + @@ -4030,6 +4395,11 @@ + + + + + @@ -4055,7 +4425,7 @@ - + @@ -4064,7 +4434,7 @@ - + @@ -4073,12 +4443,12 @@ - + - + @@ -4094,7 +4464,7 @@ - + @@ -4134,7 +4504,7 @@ - + @@ -4245,7 +4615,7 @@ - + @@ -4259,7 +4629,7 @@ - + @@ -4268,7 +4638,7 @@ - + @@ -4292,7 +4662,7 @@ - + @@ -4309,6 +4679,11 @@ + + + + + @@ -4327,6 +4702,11 @@ + + + + + @@ -4407,7 +4787,7 @@ - + @@ -4437,7 +4817,7 @@ - + @@ -4446,13 +4826,13 @@ - + - + @@ -4461,13 +4841,13 @@ - + - + @@ -4476,7 +4856,7 @@ - + @@ -4487,13 +4867,13 @@ - + - + @@ -4504,13 +4884,13 @@ - + - + @@ -4634,7 +5014,7 @@ - + @@ -4643,19 +5023,19 @@ - + - + - + @@ -4664,13 +5044,13 @@ - + - + @@ -4679,7 +5059,7 @@ - + @@ -4691,9 +5071,14 @@ + + + + + - + @@ -4702,6 +5087,11 @@ + + + + + @@ -4769,13 +5159,13 @@ - + - + @@ -4840,19 +5230,19 @@ - + - + - + @@ -4866,7 +5256,7 @@ - + @@ -4875,7 +5265,7 @@ - + @@ -4894,7 +5284,7 @@ - + @@ -4903,7 +5293,7 @@ - + @@ -4917,7 +5307,7 @@ - + @@ -4926,13 +5316,13 @@ - + - + @@ -4941,7 +5331,7 @@ - + @@ -4950,7 +5340,7 @@ - + @@ -4977,7 +5367,7 @@ - + @@ -4993,7 +5383,7 @@ - + @@ -5025,6 +5415,11 @@ + + + + + @@ -5035,6 +5430,11 @@ + + + + + @@ -5045,6 +5445,11 @@ + + + + + @@ -5055,6 +5460,11 @@ + + + + + @@ -5065,6 +5475,11 @@ + + + + + @@ -5075,6 +5490,11 @@ + + + + + @@ -5085,6 +5505,11 @@ + + + + + @@ -5137,7 +5562,7 @@ - + @@ -5200,7 +5625,7 @@ - + @@ -5246,7 +5671,7 @@ - + @@ -5302,7 +5727,7 @@ - + @@ -5357,11 +5782,11 @@ - + - + @@ -5392,7 +5817,7 @@ - + @@ -5408,7 +5833,7 @@ - + @@ -5444,7 +5869,7 @@ - + @@ -5460,7 +5885,7 @@ - + @@ -5476,7 +5901,7 @@ - + @@ -5513,7 +5938,7 @@ - + @@ -5549,7 +5974,7 @@ - + @@ -5607,7 +6032,7 @@ - + @@ -5659,7 +6084,7 @@ - + @@ -5700,7 +6125,7 @@ - + @@ -5736,7 +6161,7 @@ - + @@ -5804,7 +6229,7 @@ - + @@ -5855,7 +6280,7 @@ - + @@ -5928,7 +6353,7 @@ - + @@ -5984,7 +6409,7 @@ - + @@ -6031,7 +6456,7 @@ - + @@ -6067,7 +6492,7 @@ - + @@ -6125,7 +6550,7 @@ - + @@ -6171,7 +6596,7 @@ - + @@ -6229,7 +6654,7 @@ - + @@ -6265,7 +6690,7 @@ - + @@ -6307,7 +6732,7 @@ - + @@ -6343,7 +6768,7 @@ - + @@ -6497,6 +6922,11 @@ + + + + + @@ -6507,6 +6937,11 @@ + + + + + @@ -6517,6 +6952,11 @@ + + + + + @@ -6527,6 +6967,11 @@ + + + + + @@ -6537,6 +6982,11 @@ + + + + + @@ -6547,6 +6997,11 @@ + + + + + @@ -6557,6 +7012,11 @@ + + + + + @@ -6567,6 +7027,11 @@ + + + + + @@ -6577,6 +7042,16 @@ + + + + + + + + + + @@ -6587,6 +7062,11 @@ + + + + + @@ -6604,7 +7084,7 @@ - + @@ -6633,7 +7113,7 @@ - + @@ -6642,25 +7122,25 @@ - + - + - + - + @@ -6669,7 +7149,7 @@ - + @@ -6686,7 +7166,7 @@ - + @@ -6700,13 +7180,13 @@ - + - + @@ -6715,7 +7195,7 @@ - + @@ -6724,13 +7204,13 @@ - + - + @@ -6803,13 +7283,13 @@ - + - + @@ -6833,7 +7313,7 @@ - + @@ -6857,7 +7337,7 @@ - + @@ -6932,7 +7412,7 @@ - + @@ -6972,31 +7452,31 @@ - + - + - + - + - + @@ -7053,7 +7533,7 @@ - + @@ -7065,9 +7545,14 @@ + + + + + - + @@ -7086,31 +7571,31 @@ - + - + - + - + - + @@ -7124,6 +7609,11 @@ + + + + + @@ -7170,6 +7660,11 @@ + + + + + @@ -7200,7 +7695,7 @@ - + @@ -7333,7 +7828,7 @@ - + @@ -7411,7 +7906,7 @@ - + @@ -7425,13 +7920,13 @@ - + - + @@ -7491,13 +7986,13 @@ - + - + @@ -7621,7 +8116,7 @@ - + @@ -7650,7 +8145,7 @@ - + @@ -7700,7 +8195,7 @@ - + @@ -7711,13 +8206,13 @@ - + - + @@ -7754,7 +8249,7 @@ - + @@ -7763,7 +8258,7 @@ - + @@ -7858,7 +8353,7 @@ - + @@ -7867,7 +8362,7 @@ - + @@ -7881,22 +8376,32 @@ - + - + - + + + + + + + + + + + @@ -7937,9 +8442,14 @@ + + + + + - + @@ -7963,6 +8473,11 @@ + + + + + @@ -7983,6 +8498,11 @@ + + + + + @@ -8003,6 +8523,11 @@ + + + + + @@ -8023,6 +8548,11 @@ + + + + + @@ -8043,6 +8573,11 @@ + + + + + @@ -8103,9 +8638,14 @@ + + + + + - + @@ -8149,6 +8689,11 @@ + + + + + @@ -8184,6 +8729,11 @@ + + + + + @@ -8214,6 +8764,21 @@ + + + + + + + + + + + + + + + @@ -8254,6 +8819,11 @@ + + + + + @@ -8289,6 +8859,11 @@ + + + + + @@ -8324,6 +8899,11 @@ + + + + + @@ -8364,6 +8944,11 @@ + + + + + @@ -8386,15 +8971,15 @@ - + - + - + @@ -8407,12 +8992,25 @@ + + + + + + + + + + + + + @@ -8438,29 +9036,29 @@ - + - + - + - + - + - + @@ -8468,6 +9066,9 @@ + + + @@ -8476,10 +9077,21 @@ + + + + + + + + + + + @@ -8500,6 +9112,11 @@ + + + + + @@ -8515,6 +9132,11 @@ + + + + + @@ -8550,6 +9172,11 @@ + + + + + @@ -8585,6 +9212,11 @@ + + + + + @@ -8620,6 +9252,11 @@ + + + + + @@ -8660,6 +9297,11 @@ + + + + + @@ -8700,6 +9342,11 @@ + + + + + @@ -8775,6 +9422,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -8815,6 +9482,11 @@ + + + + + @@ -8850,6 +9522,11 @@ + + + + + @@ -8885,6 +9562,11 @@ + + + + + @@ -8920,6 +9602,11 @@ + + + + + @@ -8955,6 +9642,11 @@ + + + + + @@ -8984,11 +9676,27 @@ + + + + + + + + + + + + + + + + @@ -9085,11 +9793,24 @@ + + + + + + + + + + + + + @@ -9185,6 +9906,11 @@ + + + + + @@ -9270,6 +9996,11 @@ + + + + + @@ -9355,6 +10086,11 @@ + + + + + @@ -9395,6 +10131,11 @@ + + + + + @@ -9430,6 +10171,11 @@ + + + + + @@ -9465,6 +10211,11 @@ + + + + + @@ -9500,6 +10251,11 @@ + + + + + @@ -9525,6 +10281,11 @@ + + + + + @@ -9585,6 +10346,11 @@ + + + + + @@ -9620,6 +10386,11 @@ + + + + + @@ -9802,7 +10573,7 @@ - + @@ -9966,13 +10737,13 @@ - + - + @@ -10139,7 +10910,7 @@ - + @@ -10162,7 +10933,7 @@ - + @@ -10171,31 +10942,31 @@ - + - + - + - + - + @@ -10261,7 +11032,7 @@ - + @@ -10270,13 +11041,13 @@ - + - + @@ -10287,7 +11058,7 @@ - + @@ -10301,7 +11072,7 @@ - + @@ -10315,7 +11086,7 @@ - + @@ -10339,7 +11110,7 @@ - + @@ -10506,7 +11277,7 @@ - + @@ -10855,7 +11626,7 @@ - + @@ -10864,19 +11635,19 @@ - + - + - + @@ -10902,7 +11673,7 @@ - + @@ -10913,34 +11684,39 @@ - + - + - + - + - + + + + + + @@ -10951,13 +11727,13 @@ - + - + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f7189a776..063768116 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/database/build.gradle b/libs/database/build.gradle index e6ee2490a..003681531 100644 --- a/libs/database/build.gradle +++ b/libs/database/build.gradle @@ -8,7 +8,8 @@ plugins { } android { - compileSdkVersion 33 + namespace "org.fdroid.database" + compileSdk 34 defaultConfig { minSdkVersion 21 @@ -43,8 +44,8 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } testOptions { unitTests { @@ -52,7 +53,7 @@ android { } } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' freeCompilerArgs += "-Xexplicit-api=strict" freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } @@ -73,9 +74,9 @@ dependencies { implementation 'androidx.core:core-ktx:1.10.1' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2' - implementation "androidx.room:room-runtime:2.5.2" - implementation "androidx.room:room-ktx:2.5.2" - kapt "androidx.room:room-compiler:2.5.2" + implementation "androidx.room:room-runtime:2.6.1" + implementation "androidx.room:room-ktx:2.6.1" + kapt "androidx.room:room-compiler:2.6.1" implementation 'io.github.microutils:kotlin-logging:2.1.21' @@ -89,7 +90,7 @@ dependencies { testImplementation 'androidx.test:core:1.5.0' testImplementation 'androidx.test.ext:junit:1.1.5' testImplementation 'androidx.arch.core:core-testing:2.2.0' - testImplementation "androidx.room:room-testing:2.5.2" + testImplementation "androidx.room:room-testing:2.6.1" testImplementation 'org.robolectric:robolectric:4.10.3' testImplementation 'commons-io:commons-io:2.6' testImplementation 'ch.qos.logback:logback-classic:1.4.5' @@ -103,7 +104,7 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.arch.core:core-testing:2.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - androidTestImplementation "androidx.room:room-testing:2.5.2" + androidTestImplementation "androidx.room:room-testing:2.6.1" androidTestImplementation 'commons-io:commons-io:2.6' } diff --git a/libs/database/src/main/AndroidManifest.xml b/libs/database/src/main/AndroidManifest.xml index 07beb0bec..44008a433 100644 --- a/libs/database/src/main/AndroidManifest.xml +++ b/libs/database/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + \ No newline at end of file diff --git a/libs/download/build.gradle b/libs/download/build.gradle index 148eb3210..7897b571a 100644 --- a/libs/download/build.gradle +++ b/libs/download/build.gradle @@ -7,9 +7,9 @@ plugins { } kotlin { - android { - compilations.all { - kotlinOptions.jvmTarget = '1.8' + androidTarget { + compilations.configureEach { + kotlinOptions.jvmTarget = '17' } publishLibraryVariants("release") } @@ -22,7 +22,7 @@ kotlin { // else throw new GradleException("Host OS is not supported in Kotlin/Native.") sourceSets { - all { + configureEach { languageSettings { optIn('kotlin.RequiresOptIn') explicitApi('strict') @@ -90,19 +90,21 @@ kotlin { } android { - compileSdkVersion 33 + namespace "org.fdroid.download" + compileSdk 34 sourceSets { main.manifest.srcFile('src/androidMain/AndroidManifest.xml') getByName("androidTest").java.srcDir(file("src/androidAndroidTest/kotlin")) } defaultConfig { minSdkVersion 21 + targetSdkVersion 34 // needed for instrumentation tests testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunnerArguments disableAnalytics: 'true' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } lintOptions { checkReleaseBuilds false diff --git a/libs/download/src/androidMain/AndroidManifest.xml b/libs/download/src/androidMain/AndroidManifest.xml index 377a09c5b..56a9e28a2 100644 --- a/libs/download/src/androidMain/AndroidManifest.xml +++ b/libs/download/src/androidMain/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/libs/index/build.gradle b/libs/index/build.gradle index ab6378c8a..c4ef62dc7 100644 --- a/libs/index/build.gradle +++ b/libs/index/build.gradle @@ -1,6 +1,6 @@ plugins { id 'org.jetbrains.kotlin.multiplatform' - id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0' + id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22' id 'com.android.library' id 'org.jetbrains.dokka' id "org.jlleitschuh.gradle.ktlint" version "10.2.1" @@ -9,8 +9,8 @@ plugins { kotlin { android { - compilations.all { - kotlinOptions.jvmTarget = '1.8' + compilations.configureEach { + kotlinOptions.jvmTarget = '17' } publishLibraryVariants("release") } @@ -25,7 +25,7 @@ kotlin { // else throw new GradleException("Host OS is not supported in Kotlin/Native.") sourceSets { - all { + configureEach { languageSettings { optIn('kotlin.RequiresOptIn') explicitApi('strict') @@ -60,7 +60,7 @@ kotlin { } androidMain { dependencies { - implementation "org.jetbrains.kotlin:kotlin-reflect:1.8.20" + implementation "org.jetbrains.kotlin:kotlin-reflect:1.9.22" implementation 'androidx.core:core-ktx:1.10.1' } } @@ -89,7 +89,8 @@ kotlin { } android { - compileSdkVersion 33 + namespace "org.fdroid.index" + compileSdk 34 sourceSets { main.manifest.srcFile('src/androidMain/AndroidManifest.xml') getByName("androidTest").java.srcDir(file("src/androidAndroidTest/kotlin")) @@ -102,8 +103,8 @@ android { testInstrumentationRunnerArguments disableAnalytics: 'true' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } testOptions { unitTests.returnDefaultValues = true diff --git a/libs/index/src/androidMain/AndroidManifest.xml b/libs/index/src/androidMain/AndroidManifest.xml index d9abfd614..e10007615 100644 --- a/libs/index/src/androidMain/AndroidManifest.xml +++ b/libs/index/src/androidMain/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/libs/sharedTest/build.gradle b/libs/sharedTest/build.gradle index 7b79c4341..5974c203f 100644 --- a/libs/sharedTest/build.gradle +++ b/libs/sharedTest/build.gradle @@ -4,14 +4,18 @@ plugins { id "org.jlleitschuh.gradle.ktlint" version "10.2.1" } +kotlin { + jvmToolchain(17) +} java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } // not really an Android library, but index is not publishing for JVM at the moment android { - compileSdkVersion 33 + namespace 'org.fdroid.test' + compileSdk 34 defaultConfig { minSdkVersion 21 } diff --git a/libs/sharedTest/src/main/AndroidManifest.xml b/libs/sharedTest/src/main/AndroidManifest.xml index 0955a1977..5c3d3655b 100644 --- a/libs/sharedTest/src/main/AndroidManifest.xml +++ b/libs/sharedTest/src/main/AndroidManifest.xml @@ -1,2 +1,2 @@ - +