Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/KeyStoreUtil2.java
SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskXml.java
SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/TwoWaySync.java
SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/TwoWaySyncFile.java

tmpsrc/
110 changes: 45 additions & 65 deletions SMBSync2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,107 +1,87 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion '30.0.3'
compileSdkVersion 35
namespace "com.sentaroh.android.SMBSync2"

defaultConfig {
applicationId "com.sentaroh.android.SMBSync2"
minSdkVersion 21
// targetSdkVersion 21 //Android 5.0
// targetSdkVersion 23 //Android 6.0
targetSdkVersion 29
minSdkVersion 26
targetSdkVersion 35

//
versionCode 287
versionName "2.55"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

buildFeatures {
aidl true
buildConfig true
}

lintOptions {
disable 'MissingTranslation'
abortOnError false
checkReleaseBuilds false
}

packagingOptions {
pickFirst '**/*.jar'
}

buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

applicationVariants.all { variant ->
if (variant.buildType.name.equals("debug")) {
variant.outputs.all {
def versionName = variant.versionName
def versionNumber = variant.versionCode.toString()
def date = new java.text.SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date())
def mod_name = "${rootProject.name}"
def fileExtension= outputFileName.toString().substring(outputFileName.toString().lastIndexOf(".")+1)
def newName = "${mod_name}_debug.${fileExtension}"
// outputFileName = "../../../../../release/"+newName
outputFileName = newName

task copyDebugApk1(type: Copy) {
from 'build/outputs/apk/debug'
// into '../debug_apk/' // Into the project root, one level above the app folder
into '../release/' // Into the project root, one level above the app folder
include '**/*.apk'
}

afterEvaluate {
packageDebug.finalizedBy(copyDebugApk1)
}
}
}
}

}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
minifyEnabled true
shrinkResources true
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.txt'
}
}

applicationVariants.all { variant ->
if (variant.buildType.name.equals("release")) {
variant.outputs.all {
def versionName = variant.versionName
def versionNumber = variant.versionCode.toString()
def date = new java.text.SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date())
def mod_name = "${rootProject.name}"
def fileExtension= outputFileName.toString().substring(outputFileName.toString().lastIndexOf(".")+1)
def newName = "${mod_name}_${versionName}_${versionNumber}_release.${fileExtension}"
outputFileName = newName
}
}
applicationVariants.all { variant ->
if (variant.buildType.name.equals("debug")) {
variant.outputs.all { output ->
def mod_name = "${rootProject.name}"
def fileExtension = outputFileName.toString().substring(outputFileName.toString().lastIndexOf(".") + 1)
def newName = "${mod_name}_debug.${fileExtension}"
outputFileName = newName
}
} else if (variant.buildType.name.equals("release")) {
variant.outputs.all { output ->
def versionName = variant.versionName
def versionNumber = variant.versionCode.toString()
def mod_name = "${rootProject.name}"
def fileExtension = outputFileName.toString().substring(outputFileName.toString().lastIndexOf(".") + 1)
def newName = "${mod_name}_${versionName}_${versionNumber}_release.${fileExtension}"
outputFileName = newName
}

}
}
}

dependencies {
implementation files('libs/jcifs-ng-2.1.0-mod-08.jar')
implementation files('libs/jcifs-ng-2.1.1-20190202-03.jar')
// implementation files('libs/jcifs-ng-2.1.3-20190427-03.jar')
implementation files('libs/jcifs-ng-2.1.3-20190427-05.jar')
implementation files('libs/jcifs-ng-2.1.4-20200413-02.jar')
implementation files('libs/jcifs-1.3.17_patch.jar')
// implementation files('libs/JcifsFile-1.0.6.jar')
implementation files('libs/JcifsFile-1.0.9.jar')
// implementation files('libs/slf4j-api-1.7.7.jar')
implementation files('libs/jcifs-ng-2.1.11-SNAPSHOT.jar')
implementation files('libs/WrapperForSlf4j-1.0.2.jar')
implementation files('libs/bcprov-jdk15on-158.jar')
// implementation files('libs/WrapperForSlf4j-1.0.2.jar')

implementation files('libs/Utilities-1.0.19.aar')

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.preference:preference:1.2.1'

implementation 'com.android.support:design:28.0.0'
implementation 'com.google.android.material:material:1.11.0'

implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'

implementation files('libs/metadata-extractor-2.11.0.jar')
// implementation files('libs/xmpcore-5.1.3.jar')
Expand Down
Binary file removed SMBSync2/libs/JcifsFile-1.0.9.jar
Binary file not shown.
Binary file modified SMBSync2/libs/Utilities-1.0.19.aar
Binary file not shown.
Binary file removed SMBSync2/libs/jcifs-1.3.17_patch.jar
Binary file not shown.
Binary file removed SMBSync2/libs/jcifs-ng-2.1.0-mod-08.jar
Binary file not shown.
Binary file removed SMBSync2/libs/jcifs-ng-2.1.1-20190202-03.jar
Binary file not shown.
Binary file added SMBSync2/libs/jcifs-ng-2.1.11-SNAPSHOT.jar
Binary file not shown.
Binary file removed SMBSync2/libs/jcifs-ng-2.1.3-20190427-05.jar
Binary file not shown.
Binary file removed SMBSync2/libs/jcifs-ng-2.1.4-20200413-02.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions SMBSync2/proguard-rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Disable obfuscation per user request, but keep code shrinking and optimizations
-dontobfuscate
-dontwarn com.adobe.xmp.**
-dontwarn org.slf4j.**
-dontwarn org.patched_slf4j.**
15 changes: 11 additions & 4 deletions SMBSync2/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sentaroh.android.SMBSync2">
xmlns:tools="http://schemas.android.com/tools">

<!--<uses-sdk android:targetSdkVersion="23"/>-->

Expand All @@ -16,10 +15,14 @@
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/>


<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

Expand Down Expand Up @@ -77,6 +80,7 @@
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
android:screenOrientation="unspecified"
android:alwaysRetainTaskState="true"
android:exported="true"
>
<!--drawable/smbsync" >-->

Expand Down Expand Up @@ -111,6 +115,7 @@
android:taskAffinity=".ActivityIntentHandler"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
android:screenOrientation="unspecified"
android:exported="true"
>
<!--drawable/smbsync" >-->

Expand All @@ -135,7 +140,9 @@
>
</activity>

<service android:name="com.sentaroh.android.SMBSync2.SyncService"/>
<service
android:name="com.sentaroh.android.SMBSync2.SyncService"
android:foregroundServiceType="dataSync" />

<activity
android:name="com.sentaroh.android.SMBSync2.ShortcutAutoSync"
Expand Down Expand Up @@ -163,7 +170,7 @@
</activity>

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
Expand Down
Loading