mirror of
https://github.com/nextcloud/android.git
synced 2024-12-22 08:44:34 +03:00
Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
commit
304a1063e0
7 changed files with 123 additions and 45 deletions
|
@ -299,7 +299,7 @@ dependencies {
|
|||
huaweiImplementation project(':appscan')
|
||||
qaImplementation project(':appscan')
|
||||
|
||||
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0'
|
||||
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.13.0'
|
||||
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.6.4'
|
||||
|
||||
implementation "com.google.dagger:dagger:$daggerVersion"
|
||||
|
@ -314,7 +314,7 @@ dependencies {
|
|||
implementation "androidx.media3:media3-exoplayer:1.2.1"
|
||||
implementation "androidx.media3:media3-datasource-okhttp:1.2.1"
|
||||
|
||||
implementation 'me.zhanghai.android.fastscroll:library:1.2.0'
|
||||
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'
|
||||
|
||||
// Shimmer animation
|
||||
implementation 'io.github.elye:loaderviewlibrary:3.0.0'
|
||||
|
@ -393,13 +393,13 @@ dependencies {
|
|||
gplayImplementation "com.google.firebase:firebase-messaging:23.4.1"
|
||||
gplayImplementation 'com.google.android.play:review-ktx:2.0.1'
|
||||
|
||||
implementation 'com.github.nextcloud.android-common:ui:0.15.0'
|
||||
implementation 'com.github.nextcloud.android-common:ui:0.16.0'
|
||||
|
||||
implementation "androidx.room:room-runtime:$roomVersion"
|
||||
ksp "androidx.room:room-compiler:$roomVersion"
|
||||
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
||||
|
||||
implementation "io.coil-kt:coil:2.5.0"
|
||||
implementation "io.coil-kt:coil:2.6.0"
|
||||
|
||||
// splash screen dependency ref: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
|
||||
implementation 'androidx.core:core-splashscreen:1.0.1'
|
||||
|
|
|
@ -183,7 +183,6 @@ public class FileDisplayActivity extends FileActivity
|
|||
public static final int SINGLE_USER_SIZE = 1;
|
||||
public static final String OPEN_FILE = "NC_OPEN_FILE";
|
||||
|
||||
|
||||
private FilesBinding binding;
|
||||
|
||||
private SyncBroadcastReceiver mSyncBroadcastReceiver;
|
||||
|
@ -197,10 +196,8 @@ public class FileDisplayActivity extends FileActivity
|
|||
public static final String KEY_FILE_ID = "KEY_FILE_ID";
|
||||
public static final String KEY_FILE_PATH = "KEY_FILE_PATH";
|
||||
public static final String KEY_ACCOUNT = "KEY_ACCOUNT";
|
||||
public static final String KEY_SORT_GROUP_STATE = "KEY_SORT_GROUP_STATE";
|
||||
public static final String KEY_IS_SORT_GROUP_VISIBLE = "KEY_IS_SORT_GROUP_VISIBLE";
|
||||
|
||||
|
||||
private static final String KEY_WAITING_TO_PREVIEW = "WAITING_TO_PREVIEW";
|
||||
private static final String KEY_SYNC_IN_PROGRESS = "SYNC_IN_PROGRESS";
|
||||
private static final String KEY_WAITING_TO_SEND = "WAITING_TO_SEND";
|
||||
|
@ -240,7 +237,6 @@ public class FileDisplayActivity extends FileActivity
|
|||
private PlayerServiceConnection mPlayerConnection;
|
||||
private Optional<User> lastDisplayedUser = Optional.empty();
|
||||
private int menuItemId = -1;
|
||||
private Stack<Boolean> previousSortGroupState;
|
||||
@Inject AppPreferences preferences;
|
||||
|
||||
@Inject AppInfo appInfo;
|
||||
|
@ -293,14 +289,12 @@ public class FileDisplayActivity extends FileActivity
|
|||
@SuppressWarnings("unchecked")
|
||||
private void loadSavedInstanceState(Bundle savedInstanceState) {
|
||||
if (savedInstanceState != null) {
|
||||
previousSortGroupState = BundleExtensionsKt.getSerializableArgument(savedInstanceState, KEY_SORT_GROUP_STATE, Stack.class);
|
||||
mWaitingToPreview = BundleExtensionsKt.getParcelableArgument(savedInstanceState, KEY_WAITING_TO_PREVIEW, OCFile.class);
|
||||
mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS);
|
||||
mWaitingToSend = BundleExtensionsKt.getParcelableArgument(savedInstanceState, KEY_WAITING_TO_SEND, OCFile.class);
|
||||
searchQuery = savedInstanceState.getString(KEY_SEARCH_QUERY);
|
||||
searchOpen = savedInstanceState.getBoolean(FileDisplayActivity.KEY_IS_SEARCH_OPEN, false);
|
||||
} else {
|
||||
previousSortGroupState = new Stack<>();
|
||||
mWaitingToPreview = null;
|
||||
mSyncInProgress = false;
|
||||
mWaitingToSend = null;
|
||||
|
@ -613,7 +607,7 @@ public class FileDisplayActivity extends FileActivity
|
|||
//clear the subtitle while navigating to any other screen from Media screen
|
||||
clearToolbarSubtitle();
|
||||
|
||||
setSortListGroup(sortListGroupVisibility(), showSortListGroup);
|
||||
showSortListGroup(showSortListGroup);
|
||||
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
transaction.addToBackStack(null);
|
||||
|
@ -1030,7 +1024,7 @@ public class FileDisplayActivity extends FileActivity
|
|||
setDrawerIndicatorEnabled(isDrawerIndicatorAvailable());
|
||||
}
|
||||
if (leftFragment instanceof UnifiedSearchFragment) {
|
||||
popSortListGroupVisibility();
|
||||
showSortListGroup(false);
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
@ -1039,13 +1033,12 @@ public class FileDisplayActivity extends FileActivity
|
|||
/**
|
||||
* Use this method when want to pop the fragment on back press. It resets Scrolling (See
|
||||
* {@link #resetScrolling(boolean) with true} and pop the visibility for sortListGroup (See
|
||||
* {@link #setSortListGroup(boolean, boolean)}. At last call to super.onBackPressed()
|
||||
* {@link #showSortListGroup(boolean) with false}. At last call to super.onBackPressed()
|
||||
*/
|
||||
private void popBack() {
|
||||
// pop back fragment
|
||||
binding.fabMain.setImageResource(R.drawable.ic_plus);
|
||||
resetScrolling(true);
|
||||
popSortListGroupVisibility();
|
||||
showSortListGroup(false);
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
|
@ -1057,14 +1050,13 @@ public class FileDisplayActivity extends FileActivity
|
|||
super.onSaveInstanceState(outState);
|
||||
outState.putParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW, mWaitingToPreview);
|
||||
outState.putBoolean(FileDisplayActivity.KEY_SYNC_IN_PROGRESS, mSyncInProgress);
|
||||
//outState.putBoolean(FileDisplayActivity.KEY_REFRESH_SHARES_IN_PROGRESS,
|
||||
// outState.putBoolean(FileDisplayActivity.KEY_REFRESH_SHARES_IN_PROGRESS,
|
||||
// mRefreshSharesInProgress);
|
||||
outState.putParcelable(FileDisplayActivity.KEY_WAITING_TO_SEND, mWaitingToSend);
|
||||
if (searchView != null) {
|
||||
outState.putBoolean(KEY_IS_SEARCH_OPEN, !searchView.isIconified());
|
||||
}
|
||||
outState.putString(KEY_SEARCH_QUERY, searchQuery);
|
||||
outState.putSerializable(KEY_SORT_GROUP_STATE, previousSortGroupState);
|
||||
outState.putBoolean(KEY_IS_SORT_GROUP_VISIBLE, sortListGroupVisibility());
|
||||
Log_OC.v(TAG, "onSaveInstanceState() end");
|
||||
}
|
||||
|
@ -2470,28 +2462,4 @@ public class FileDisplayActivity extends FileActivity
|
|||
listOfFiles.onItemClicked(selectedFile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to set the visibility of SortListGroup while going to another fragment/view (which needs
|
||||
* different visibility) It internally sets the visibility as well as save the previous one in the stack so that on
|
||||
* going back it pops out the correct visibility. Also see {@link #popSortListGroupVisibility()}
|
||||
*/
|
||||
private void setSortListGroup(boolean currentListGroupVisibility, boolean show) {
|
||||
previousSortGroupState.push(currentListGroupVisibility);
|
||||
showSortListGroup(show);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to set the visibility of SortListGroup when coming back from a view/fragment (which changed the
|
||||
* visibility earlier using {@link #setSortListGroup(boolean, boolean)}
|
||||
*/
|
||||
private void popSortListGroupVisibility() {
|
||||
showSortListGroup(false);
|
||||
|
||||
if (previousSortGroupState.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
previousSortGroupState.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import android.content.Context
|
|||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.afollestad.sectionedrecyclerview.SectionedRecyclerViewAdapter
|
||||
|
@ -130,7 +131,7 @@ class GalleryAdapter(
|
|||
return files.size
|
||||
}
|
||||
|
||||
override fun getPopupText(position: Int): String {
|
||||
override fun getPopupText(p0: View, position: Int): CharSequence {
|
||||
return DisplayUtils.getDateByPattern(
|
||||
files[getRelativePosition(position).section()].date,
|
||||
context,
|
||||
|
|
|
@ -1111,7 +1111,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getPopupText(int position) {
|
||||
public String getPopupText(View view, int position) {
|
||||
OCFile file = getItem(position);
|
||||
|
||||
if (file == null || sortOrder == null) {
|
||||
|
|
|
@ -238,7 +238,7 @@ class GalleryFastScrollViewHelper(
|
|||
return if (position == RecyclerView.NO_POSITION) {
|
||||
null
|
||||
} else {
|
||||
popupTextProvider.getPopupText(position).toString()
|
||||
popupTextProvider.getPopupText(mView, position).toString()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,10 @@
|
|||
</trusted-key>
|
||||
<trusted-key id="0D35D3F60078655126908E8AF3D1600878E85A3D" group="io.netty"/>
|
||||
<trusted-key id="0F07D1201BDDAB67CFB84EB479752DB6C966F0B8" group="com.google.android" name="annotations" version="4.1.1.4"/>
|
||||
<trusted-key id="10C645B4C93F47C20D15180007AB29E5E5EE5FCF" group="me.zhanghai.android.fastscroll" name="library" version="1.2.0"/>
|
||||
<trusted-key id="10C645B4C93F47C20D15180007AB29E5E5EE5FCF">
|
||||
<trusting group="me.zhanghai.android.fastscroll" name="library" version="1.2.0"/>
|
||||
<trusting group="me.zhanghai.android.fastscroll" name="library" version="1.3.0"/>
|
||||
</trusted-key>
|
||||
<trusted-key id="120D6F34E627ED3A772EBBFE55C7E5E701832382" group="org.snakeyaml" name="snakeyaml-engine" version="2.6"/>
|
||||
<trusted-key id="137970EF12A6F2B8B501F62430D28CA4CCC665C6" group="com.github.stateless4j" name="stateless4j" version="2.6.0"/>
|
||||
<trusted-key id="13AC2213964ABE1D1C147C0E1939A2520BAB1D90" group="org.freemarker" name="freemarker" version="2.3.32"/>
|
||||
|
@ -167,6 +170,7 @@
|
|||
<trusting group="androidx.core"/>
|
||||
<trusting group="androidx.fragment"/>
|
||||
<trusting group="androidx.lifecycle"/>
|
||||
<trusting group="androidx.preference" name="preference-ktx" version="1.2.1"/>
|
||||
<trusting group="androidx.recyclerview" name="recyclerview" version="1.3.2"/>
|
||||
<trusting group="androidx.room"/>
|
||||
<trusting group="androidx.sqlite"/>
|
||||
|
@ -1863,6 +1867,14 @@
|
|||
<sha256 value="0f10b63cfd5292d16678077bdb78363447b832801936c401fc26e68293f2106f" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.preference" name="preference" version="1.2.1">
|
||||
<artifact name="preference-1.2.1.aar">
|
||||
<sha256 value="40ca8adfdb7effb61facb39bd9ca2e2f3a40d106743b0cd6dc9e21e8bedd4f85" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="preference-1.2.1.module">
|
||||
<sha256 value="b9a4dc6d8d232878f717dfac00c77bf384bbb52c26e4064f7bcaa966c10a2629" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.print" name="print" version="1.0.0">
|
||||
<artifact name="print-1.0.0.aar">
|
||||
<sha256 value="1d5c7f3135a1bba661fc373fd72e11eb0a4adbb3396787826dd8e4190d5d9edd" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -1924,6 +1936,14 @@
|
|||
<sha256 value="7fa22bf1ab1a8d1544622076e2ad8454e2bef1402b3298b5b4079ab732e38845" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.recyclerview" name="recyclerview" version="1.3.1">
|
||||
<artifact name="recyclerview-1.3.1.aar">
|
||||
<sha256 value="4cfed42bdcc196d11e9b10da68c1f96cd4bda4cd8521e7285f62442c0c11de08" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="recyclerview-1.3.1.module">
|
||||
<sha256 value="befd6dc2973bbe6efc5191e7400322713928e7e0764429a275cd9cb1a406dd71" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.resourceinspection" name="resourceinspection-annotation" version="1.0.1">
|
||||
<artifact name="resourceinspection-annotation-1.0.1.jar">
|
||||
<sha256 value="8cff870ec6fb31db48a52f4a792335b4bf8de07e03bd37823181526433ccd5cb" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -2041,6 +2061,14 @@
|
|||
<sha256 value="40e90f96838c2a8156ab51b181400767049f387cec8c695e412d3d9205b0745b" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.slidingpanelayout" name="slidingpanelayout" version="1.2.0">
|
||||
<artifact name="slidingpanelayout-1.2.0.aar">
|
||||
<sha256 value="5f53339be2a4f90a9abea3571dd59e70a8a49e7f15dd82974a3898b4652e8714" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="slidingpanelayout-1.2.0.module">
|
||||
<sha256 value="3531bf0081b78538589f7e840fc0f7c70a45c4d8a2d17fb2f0eaceee2a99b59b" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.sqlite" name="sqlite" version="2.3.1">
|
||||
<artifact name="sqlite-2.3.1.aar">
|
||||
<sha256 value="e4b0c580b676bd3dfbed21bfc15d4780326c545cc14fda46a5a9247e59ec8b8a" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -2359,6 +2387,14 @@
|
|||
<sha256 value="247f12757acabd706b069445fd31c83c016cc7fe67b0468c582d043ea7d20de1" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.transition" name="transition" version="1.4.1">
|
||||
<artifact name="transition-1.4.1.aar">
|
||||
<sha256 value="36d28d9ec33a8c64313842bce99c95736da5b27a6b3a513639050de82f075726" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="transition-1.4.1.module">
|
||||
<sha256 value="dec13dbe9ab525bcb115b47b4f219ce262c4892859c653912f898964eccf79ae" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.vectordrawable" name="vectordrawable" version="1.1.0">
|
||||
<artifact name="vectordrawable-1.1.0.aar">
|
||||
<sha256 value="46fd633ac01b49b7fcabc263bf098c5a8b9e9a69774d234edcca04fb02df8e26" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -2428,6 +2464,14 @@
|
|||
<sha256 value="bcdfd95272911afbfb565f09d87b3ec0c8b21ac9542e70290a566ffdceaa2138" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.window" name="window" version="1.0.0">
|
||||
<artifact name="window-1.0.0.aar">
|
||||
<sha256 value="3212985be4127373ca4d0ea7f8b81a250ae2105e924f7940105d067a0f9ac130" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="window-1.0.0.module">
|
||||
<sha256 value="536773d2b2d65c26ce06b8c95e0fb415f1ad25d9b87330170f508689d3ad5ffb" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="androidx.work" name="work-runtime" version="2.8.1">
|
||||
<artifact name="work-runtime-2.8.1.aar">
|
||||
<sha256 value="26d9d5622a0d69c2b601cb661ea175f6e0b54db2753711b18ca136be4b9ae9c2" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -3350,6 +3394,14 @@
|
|||
<sha256 value="609090237e7d6c9745dcb883819e53bb4c9337b89740aa88fd1c56d73ecfa56b" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.nextcloud.android-common" name="core" version="0.16.0">
|
||||
<artifact name="core-0.16.0.aar">
|
||||
<sha256 value="d370010eeae5928f525f31c09e33f9c78ed5e610af4b9f84b1ba68ce0727267b" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="core-0.16.0.module">
|
||||
<sha256 value="2b9fe04f11de743212d44d35aeb084996637cf9dcc7a25bcf7b76b4af23e8479" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.nextcloud.android-common" name="material-color-utilities" version="0.13.0">
|
||||
<artifact name="material-color-utilities-0.13.0.jar">
|
||||
<sha256 value="d0e932c5de6e2aefd4c0a66caa86df4bc6c582189e67de95ede894ed1adb9367" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -3374,6 +3426,14 @@
|
|||
<sha256 value="edc221870d47808e96595f11d58dc6f45e50a9d8979658f024ae9a816778ecfb" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.nextcloud.android-common" name="material-color-utilities" version="0.16.0">
|
||||
<artifact name="material-color-utilities-0.16.0.jar">
|
||||
<sha256 value="f402b2986f1a524dcb90d004e066541f16a3cb792b281482f623bd973a0adcd0" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="material-color-utilities-0.16.0.module">
|
||||
<sha256 value="9f78238c228e06485c0f9409b0825064a2bbd8f381db964b129b76587b03277c" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.nextcloud.android-common" name="ui" version="0.13.0">
|
||||
<artifact name="ui-0.13.0.aar">
|
||||
<sha256 value="4d73e91f3692d9f1d34d89d8a87d91e632f18e6366ec9f1fec6b0648bc4f25ea" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
|
@ -3398,6 +3458,14 @@
|
|||
<sha256 value="ac04b3a93aae2e9e8585d01447210fe0c5c85dec13e241b5e7c8956a3ed8a962" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.nextcloud.android-common" name="ui" version="0.16.0">
|
||||
<artifact name="ui-0.16.0.aar">
|
||||
<sha256 value="1c9ed8fed68e46c0aa9c63aefda3f18349ff590b1069fd286fa322bfc66c6307" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
<artifact name="ui-0.16.0.module">
|
||||
<sha256 value="c588c69cd8540cb9bd57899df0b833eb9bb3787e10ac9ea3476b2005c98d9543" origin="Generated by Gradle" reason="Artifact is not signed"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.spotbugs" name="spotbugs" version="4.7.3">
|
||||
<artifact name="spotbugs-4.7.3.jar">
|
||||
<sha256 value="df37eab21a7d04aa807808a33e9f7c081451cb02c14b4a2c33119976be498520" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
|
||||
|
|
41
scripts/updateLibraryHash.sh
Executable file
41
scripts/updateLibraryHash.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Nextcloud Android client application
|
||||
#
|
||||
# @author Tobias Kaminsky
|
||||
# Copyright (C) 2024 Tobias Kaminsky
|
||||
# Copyright (C) 2024 Nextcloud GmbH
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
latestCommit=$(curl -s https://api.github.com/repos/nextcloud/android-library/commits/master | jq .sha | sed s'/\"//g')
|
||||
currentCommit=$(grep "androidLibraryVersion" build.gradle | cut -f2 -d'"')
|
||||
|
||||
git fetch
|
||||
git checkout master
|
||||
git pull
|
||||
|
||||
[[ $latestCommit == "$currentCommit" ]] && exit # nothing to do
|
||||
|
||||
git fetch
|
||||
git checkout -B update-library-"$(date +%F)" origin/master
|
||||
|
||||
sed -i s"#androidLibraryVersion\ =.*#androidLibraryVersion =\"$latestCommit\"#" build.gradle
|
||||
./gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256,pgp help
|
||||
|
||||
git add build.gradle
|
||||
git add gradle/verification-metadata.xml
|
||||
git commit -s -m "Update library"
|
||||
gh pr create --title "Update library $(date +%F)" --body "Update library to latest commit"
|
Loading…
Reference in a new issue