Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38c6b79bc2 | |||
| 3dc72e991d | |||
| f65a12a113 | |||
| 3be25d8161 | |||
| 62a92a65f1 | |||
| 6d1c6541b3 | |||
| 9c32bf7d7d | |||
| 9aaced3d7a | |||
| e1a4f36543 | |||
| 6ebf5b02dd | |||
| 553f591918 | |||
| c422294d7c | |||
| 45938f7cec | |||
| 0c08aae266 | |||
| 1b3712eeca | |||
| 82468c7e10 | |||
| e29de59384 | |||
| 2658560210 | |||
| 68ce7346b1 | |||
| aa01fcabfb | |||
| a83b432db6 | |||
| 4a328d33e0 | |||
| febd4f138c | |||
| 23771a9b59 | |||
| 97de9776a1 | |||
| 7c8e2d58f5 | |||
| 3c77188985 | |||
| 422ff51b9e | |||
| 50090c8ed7 | |||
| 6f5168bc27 | |||
| 5684eb62b2 | |||
| 21ec78154d | |||
| 7f6fcc6c79 | |||
| e8a1df940c | |||
| 5dc5dbbe57 | |||
| 53247d46e1 | |||
| b5ade63bf9 | |||
| 683cc5759c | |||
| 7b9aed8842 | |||
| 5137be71c7 | |||
| 1c7441c76b | |||
| c785569077 | |||
| 5b1a0849f2 | |||
| a4183e6900 | |||
| cf39fec1ad | |||
| 4e312a9685 | |||
| b05f23c107 | |||
| 7b0f078fa3 | |||
| 84b83c1607 | |||
| 2bb469496b | |||
| ba142431b6 | |||
| f9bbd337dc | |||
| efb867b979 | |||
| 08bd35bf8f | |||
| 83e2c2f908 | |||
| b07b79388f | |||
| dcde55fd1a | |||
| 19f6ba4d65 | |||
| 098828d8d5 |
114
.gitea/workflows/release.yml
Normal file
114
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,114 @@
|
||||
name: Android Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# ------------------- Checkout -------------------
|
||||
- name: Checkout
|
||||
uses: https://git.daemonlord.ru/actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
tags: true
|
||||
|
||||
# ------------------- Setup JDK -------------------
|
||||
- name: Set up JDK 17
|
||||
uses: https://git.daemonlord.ru/actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
# ------------------- Install Node.js -------------------
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||
apt-get install -y nodejs
|
||||
|
||||
# ------------------- Extract version -------------------
|
||||
- name: Extract versionName
|
||||
id: extract_version
|
||||
run: |
|
||||
VERSION=$(grep -oP 'versionName\s+"[^"]+"' app/build.gradle | head -n1 | cut -d'"' -f2 | tr -d '\r\n')
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Detected version: $VERSION"
|
||||
|
||||
# ------------------- Stop if already released -------------------
|
||||
- name: Stop if version already released
|
||||
id: stop
|
||||
run: |
|
||||
VERSION=${{ steps.extract_version.outputs.version }}
|
||||
if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then
|
||||
echo "Version $VERSION already released, stopping job."
|
||||
echo "CONTINUE=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Version $VERSION not released yet, continuing workflow..."
|
||||
echo "CONTINUE=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# ------------------- Decode keystore -------------------
|
||||
- name: Decode keystore
|
||||
if: env.CONTINUE == 'true'
|
||||
run: |
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > app/release.keystore
|
||||
|
||||
- name: Make Gradlew executable
|
||||
if: env.CONTINUE == 'true'
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
# ------------------- Set up Android SDK -------------------
|
||||
- name: Set up Android SDK
|
||||
if: env.CONTINUE == 'true'
|
||||
uses: https://git.daemonlord.ru/actions/setup-android@v3
|
||||
|
||||
# ------------------- Build Release APK -------------------
|
||||
- name: Build Release APK
|
||||
if: env.CONTINUE == 'true'
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
run: ./gradlew --no-daemon assembleRelease
|
||||
|
||||
# ------------------- Git tag -------------------
|
||||
- name: Create git tag
|
||||
if: env.CONTINUE == 'true'
|
||||
run: |
|
||||
git tag $VERSION
|
||||
git push origin $VERSION
|
||||
|
||||
# ------------------- Gitea release -------------------
|
||||
- name: Create Gitea Release
|
||||
if: env.CONTINUE == 'true'
|
||||
uses: https://git.daemonlord.ru/actions/gitea-release-action@v1
|
||||
with:
|
||||
server_url: https://git.daemonlord.ru
|
||||
repository: ${{ gitea.repository }}
|
||||
token: ${{ secrets.API_TOKEN }}
|
||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||
name: Release ${{ steps.extract_version.outputs.version }}
|
||||
body: |
|
||||
Android release ${{ steps.extract_version.outputs.version }}
|
||||
files: |
|
||||
app/build/outputs/apk/release/*.apk
|
||||
|
||||
# ------------------- Deploy F-Droid Repo via SCP -------------------
|
||||
- name: Deploy F-Droid Repo via SCP
|
||||
if: env.CONTINUE == 'true'
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
SCP_SERVER: ${{ secrets.SCP_SERVER }}
|
||||
SCP_USER: ${{ secrets.SCP_USER }}
|
||||
SCP_TARGET_PATH: ${{ secrets.SCP_TARGET_PATH }}
|
||||
SCP_PORT: ${{ secrets.SCP_PORT }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -p $SCP_PORT -H $SCP_SERVER >> ~/.ssh/known_hosts
|
||||
rsync -avz --delete -e "ssh -p $SCP_PORT" fdroid-repo/ $SCP_USER@$SCP_SERVER:$SCP_TARGET_PATH
|
||||
@@ -4,38 +4,50 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace 'com.anabasis.vkchatmanager'
|
||||
compileSdk {
|
||||
version = release(36)
|
||||
}
|
||||
compileSdk 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.anabasis.vkchatmanager"
|
||||
minSdk 26
|
||||
targetSdk 36
|
||||
versionCode 2
|
||||
versionName "1.1"
|
||||
versionCode 10103
|
||||
versionName "1.1.3"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
// --- Настройка signingConfigs ---
|
||||
signingConfigs {
|
||||
release {
|
||||
// Путь к keystore — от корня проекта
|
||||
storeFile file("release.keystore")
|
||||
storePassword System.getenv("KEYSTORE_PASSWORD") ?: "change_me"
|
||||
keyAlias System.getenv("KEY_ALIAS") ?: "change_me"
|
||||
keyPassword System.getenv("KEY_PASSWORD") ?: "change_me"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
|
||||
// Используем signingConfig release
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.1.0'
|
||||
implementation "com.google.android.material:material:1.12.0"
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||
implementation 'org.json:json:20240303'
|
||||
implementation libs.recyclerview
|
||||
implementation libs.viewpager2
|
||||
implementation libs.material
|
||||
implementation libs.swiperefreshlayout
|
||||
implementation libs.okhttp
|
||||
implementation libs.json
|
||||
}
|
||||
|
||||
@@ -42,10 +42,13 @@ public class ChatListFragment extends Fragment {
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
chats = (ArrayList<VkChat>)
|
||||
getArguments().getSerializable(ARG_CHATS);
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
chats = (ArrayList<VkChat>) arguments.getSerializable(ARG_CHATS);
|
||||
}
|
||||
if (chats == null) chats = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -90,11 +93,4 @@ public class ChatListFragment extends Fragment {
|
||||
if (c.selected) res.add(c);
|
||||
return res;
|
||||
}
|
||||
|
||||
public void updateChats() {
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.anabasis.vkchatmanager.dialogs;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
@@ -33,7 +32,7 @@ public class MultiLinkDialog extends DialogFragment {
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
||||
View view = LayoutInflater.from(requireContext()).inflate(R.layout.dialog_multilink, null);
|
||||
View view = getLayoutInflater().inflate(R.layout.dialog_multilink, null);
|
||||
EditText input = view.findViewById(R.id.linksInput);
|
||||
|
||||
return new MaterialAlertDialogBuilder(requireContext())
|
||||
|
||||
@@ -23,7 +23,7 @@ public class VkApiClient {
|
||||
"&v=5.131";
|
||||
|
||||
Request r = new Request.Builder().url(url).build();
|
||||
Response res = client.newCall(r).execute();
|
||||
try (Response res = client.newCall(r).execute()) {
|
||||
|
||||
String body = res.body().string();
|
||||
JSONObject json = new JSONObject(body);
|
||||
@@ -38,6 +38,7 @@ public class VkApiClient {
|
||||
|
||||
return json;
|
||||
}
|
||||
}
|
||||
|
||||
public JSONArray getChats() throws Exception {
|
||||
return call("messages.getConversations", "count=200&filter=all")
|
||||
|
||||
@@ -121,7 +121,9 @@
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
BIN
assets/app_icon.png
Normal file
BIN
assets/app_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
assets/icon.png
Normal file
BIN
assets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
@@ -1,20 +1,20 @@
|
||||
[versions]
|
||||
agp = "9.0.0"
|
||||
coreKtx = "1.17.0"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.3.0"
|
||||
espressoCore = "3.7.0"
|
||||
appcompat = "1.7.1"
|
||||
material = "1.13.0"
|
||||
recyclerview = "1.4.0"
|
||||
viewpager2 = "1.1.0"
|
||||
swiperefreshlayout = "1.2.0"
|
||||
okhttp = "5.3.2"
|
||||
json = "20251224"
|
||||
|
||||
[libraries]
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
|
||||
viewpager2 = { group = "androidx.viewpager2", name = "viewpager2", version.ref = "viewpager2" }
|
||||
swiperefreshlayout = { group = "androidx.swiperefreshlayout", name = "swiperefreshlayout", version.ref = "swiperefreshlayout" }
|
||||
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
||||
json = { group = "org.json", name = "json", version.ref = "json" }
|
||||
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ pluginManagement {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
|
||||
Reference in New Issue
Block a user