Skip to content

Commit 740f703

Browse files
Reenable android support through compiled libraries
1 parent a68d00f commit 740f703

File tree

7 files changed

+3
-122
lines changed

7 files changed

+3
-122
lines changed

android/CMakeLists.txt

Lines changed: 0 additions & 112 deletions
This file was deleted.

android/build.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ android {
4242
sourceSets {
4343
main {
4444
// Bundle so files with the final apk.
45-
jniLibs.srcDirs = ['../native/lib/android']
45+
jniLibs.srcDirs = ['libraries']
4646
}
4747
}
4848

@@ -54,11 +54,5 @@ android {
5454
defaultConfig {
5555
minSdkVersion 19
5656
}
57-
58-
externalNativeBuild {
59-
cmake {
60-
path "CMakeLists.txt"
61-
}
62-
}
6357
}
6458

483 KB
Binary file not shown.
Binary file not shown.
485 KB
Binary file not shown.
519 KB
Binary file not shown.

lib/framework/dive_computer_ffi.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ class DiveComputerFfi {
3535
);
3636
});
3737

38-
const String libName = 'dive_computer';
3938
String fileName;
4039
if (Platform.isWindows) {
4140
fileName = 'libdivecomputer-0.dll';
4241
} else if (Platform.isAndroid) {
43-
fileName = 'lib$libName.so';
42+
fileName = 'libdivecomputer.so';
4443
} else if (Platform.isMacOS || Platform.isIOS) {
45-
fileName = '$libName.framework/$libName';
44+
fileName = 'dive_computer.framework/dive_computer';
4645
} else {
4746
throw UnsupportedError('Unknown platform: ${Platform.operatingSystem}');
4847
}

0 commit comments

Comments
 (0)