Skip to content

Commit

Permalink
Merge branch 'main' of github.com:youlookwhat/BySMB
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/build.gradle
#	gradle.properties
  • Loading branch information
youlookwhat committed Aug 7, 2022
2 parents 12c51ad + a99ce05 commit b8f31ec
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 20 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ captures/

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
Expand Down
43 changes: 35 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,22 @@ plugins {
}

android {
compileSdkVersion 28
compileSdkVersion 29
buildToolsVersion "28.0.3"

defaultConfig {
applicationId "me.jingbin.smb.demo"
minSdkVersion 19
targetSdkVersion 28
targetSdkVersion 29
versionCode 2
versionName "2.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
ndk {
abiFilters 'armeabi-v7a', "x86"
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -35,6 +32,36 @@ android {
dataBinding {
enabled = true
}

//签名 其他smb
// signingConfigs {
// release {
// storeFile file("./bysmb.jks")
// storePassword "bysmb2021"
// keyAlias "bysmb"
// keyPassword "bysmb2021"
// v1SigningEnabled true
// v2SigningEnabled true
// }
// }
// buildTypes {
// release {
// // 混淆
// minifyEnabled false
// // Zipalign优化
// zipAlignEnabled false
// // 移除无用的resource文件
// shrinkResources false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release
// }
//
// debug {
//// signingConfig signingConfigs.release
// minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// }
// }
}

dependencies {
Expand Down
24 changes: 23 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# Android插件会使用相应的AndroidX库而不是支持库,默认为false。
android.enableJetifier=true
android.useAndroidX=true
# Android插件会自动迁移现有的第三方库,通过重写其二进制文件来使用AndroidX,默认为false。
android.useAndroidX=true
org.gradle.jvmargs=-Xmx4096m
14 changes: 7 additions & 7 deletions smb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ apply plugin: 'maven'
group = 'com.github.youlookwhat'

java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
Expand All @@ -18,12 +18,12 @@ dependencies {

// 读取及写入网络共享文件
api group: 'com.hierynomus', name: 'smbj', version: '0.10.0'
api group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
api group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60'
api group: 'net.engio', name: 'mbassador', version: '1.3.0'
api group: 'com.hierynomus', name: 'asn-one', version: '0.4.0'
// api group: 'com.hierynomus', name: 'asn-one', version: '0.5.0'
// api group: 'org.slf4j', name: 'slf4j-api', version: '2.0.0-alpha6'
// api group: 'org.slf4j', name: 'slf4j-log4j12', version: '2.0.0-alpha6'
// api group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
// api group: 'net.engio', name: 'mbassador', version: '1.3.0'
// api group: 'org.apache.cassandra', name: 'cassandra-all', version: '0.8.1'
// api group: 'org.slf4j', name: 'slf4j-simple', version: '1.6.4'

api group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.6.6'
}
2 changes: 0 additions & 2 deletions smb/src/main/java/me/jingbin/smb/BySMB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.hierynomus.smbj.SmbConfig
import com.hierynomus.smbj.auth.AuthenticationContext
import com.hierynomus.smbj.connection.Connection
import com.hierynomus.smbj.share.DiskShare
import org.apache.log4j.BasicConfigurator
import java.io.*
import java.util.*
import java.util.concurrent.TimeUnit
Expand Down Expand Up @@ -215,7 +214,6 @@ class BySMB(private val builder: Builder) {
System.setProperty("jcifs.smb.client.dfs.disabled", "true")
System.setProperty("jcifs.smb.client.soTimeout", soTimeout)
System.setProperty("jcifs.smb.client.responseTimeout", responseTimeout)
BasicConfigurator.configure()
}
}

Expand Down

0 comments on commit b8f31ec

Please sign in to comment.