Skip to content

Commit eecd8d5

Browse files
committed
update JSch and NMSSH to modernized forks
1 parent cce3e45 commit eecd8d5

8 files changed

Lines changed: 19 additions & 15 deletions

File tree

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,36 @@ version '1.0-SNAPSHOT'
44
buildscript {
55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.1.0'
11+
classpath 'com.android.tools.build:gradle:4.1.3'
1212
}
1313
}
1414

1515
rootProject.allprojects {
1616
repositories {
1717
google()
18-
jcenter()
18+
mavenCentral()
1919
}
2020
}
2121

2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 28
25+
compileSdkVersion 30
2626

2727
defaultConfig {
2828
minSdkVersion 16
29-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
29+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
3030
}
3131
lintOptions {
3232
disable 'InvalidPackage'
3333
}
3434

3535
dependencies {
36-
implementation 'com.jcraft:jsch:0.1.54'
36+
implementation 'com.github.mwiede:jsch:0.1.65'
3737
}
3838

3939
compileOptions {

android/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
android.enableJetifier=true

example/android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.4.20'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.0.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
google()
17-
jcenter()
17+
mavenCentral()
1818
}
1919
}
2020

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

ios/Classes/SSHClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import <NMSSH/NMSSH.h>
1+
#import <GZ_NMSSH/NMSSH.h>
22

33
@protocol SSHClientDelegate <NSObject>
44
- (void) shellEvent:(NSString *)event withKey:(NSString *)key;

ios/Classes/SSHClient.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ - (void) startShell:(NSString *)ptyType error:(NSError * __autoreleasing *)error
5454
}
5555

5656
channel.ptyTerminalType = type;
57+
dispatch_queue_t my_queue = dispatch_queue_create("queue_identifier", 0);
58+
5759
dispatch_async(dispatch_get_main_queue(), ^
5860
{
59-
[channel startShell:error];
61+
[channel startShellWithCallbackQueue:my_queue error:error];
6062
});
6163
}
6264

ios/Classes/SshPlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import <Flutter/Flutter.h>
2-
#import <NMSSH/NMSSH.h>
2+
#import <GZ_NMSSH/NMSSH.h>
33
#import "SSHClient.h"
44

55
@interface SshPlugin : NSObject<FlutterPlugin, NMSSHChannelDelegate, SSHClientDelegate, FlutterStreamHandler>

ios/ssh2.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SSH and SFTP client for Flutter. Wraps iOS library NMSSH and Android library Jsc
1515
s.source_files = 'Classes/**/*'
1616
s.public_header_files = 'Classes/**/*.h'
1717
s.dependency 'Flutter'
18-
s.dependency 'NMSSH'
18+
s.dependency 'GZ-NMSSH', '~> 4.1.5'
1919

2020
s.ios.deployment_target = '9.0'
2121
end

0 commit comments

Comments
 (0)