try
This commit is contained in:
parent
a04d27dd4c
commit
7bc018314c
|
@ -187,6 +187,7 @@ dependencies {
|
||||||
implementation 'androidx.browser:browser:1.3.0'
|
implementation 'androidx.browser:browser:1.3.0'
|
||||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||||
implementation project(path: ':torrentStream')
|
implementation project(path: ':torrentStream')
|
||||||
|
implementation project(path: ':frostwire-jlibtorrent')
|
||||||
testImplementation 'junit:junit:4.13.1'
|
testImplementation 'junit:junit:4.13.1'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||||
|
|
|
@ -9,26 +9,18 @@
|
||||||
package com.frostwire.jlibtorrent.swig;
|
package com.frostwire.jlibtorrent.swig;
|
||||||
|
|
||||||
public class add_piece_flags_t {
|
public class add_piece_flags_t {
|
||||||
protected transient boolean swigCMemOwn;
|
|
||||||
private transient long swigCPtr;
|
private transient long swigCPtr;
|
||||||
|
protected transient boolean swigCMemOwn;
|
||||||
|
|
||||||
protected add_piece_flags_t(long cPtr, boolean cMemoryOwn) {
|
protected add_piece_flags_t(long cPtr, boolean cMemoryOwn) {
|
||||||
swigCMemOwn = cMemoryOwn;
|
swigCMemOwn = cMemoryOwn;
|
||||||
swigCPtr = cPtr;
|
swigCPtr = cPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public add_piece_flags_t() {
|
|
||||||
this(libtorrent_jni.new_add_piece_flags_t(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static long getCPtr(add_piece_flags_t obj) {
|
protected static long getCPtr(add_piece_flags_t obj) {
|
||||||
return (obj == null) ? 0 : obj.swigCPtr;
|
return (obj == null) ? 0 : obj.swigCPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static add_piece_flags_t all() {
|
|
||||||
return new add_piece_flags_t(libtorrent_jni.add_piece_flags_t_all(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
protected void finalize() {
|
protected void finalize() {
|
||||||
delete();
|
delete();
|
||||||
|
@ -44,6 +36,10 @@ public class add_piece_flags_t {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public add_piece_flags_t() {
|
||||||
|
this(libtorrent_jni.new_add_piece_flags_t(), true);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean nonZero() {
|
public boolean nonZero() {
|
||||||
return libtorrent_jni.add_piece_flags_t_nonZero(swigCPtr, this);
|
return libtorrent_jni.add_piece_flags_t_nonZero(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
@ -76,4 +72,8 @@ public class add_piece_flags_t {
|
||||||
return libtorrent_jni.add_piece_flags_t_to_int(swigCPtr, this);
|
return libtorrent_jni.add_piece_flags_t_to_int(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static add_piece_flags_t all() {
|
||||||
|
return new add_piece_flags_t(libtorrent_jni.add_piece_flags_t_all(), true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,15 +25,15 @@ export PATH=$ANDROID_TOOLCHAIN/arm-linux-androideabi/bin:$PATH;
|
||||||
sed -i 's/RANLIB = ranlib/RANLIB = "${ANDROID_TOOLCHAIN}\/bin\/arm-linux-androideabi-ranlib"/g' ${BOOST_ROOT}/tools/build/src/tools/gcc.jam;
|
sed -i 's/RANLIB = ranlib/RANLIB = "${ANDROID_TOOLCHAIN}\/bin\/arm-linux-androideabi-ranlib"/g' ${BOOST_ROOT}/tools/build/src/tools/gcc.jam;
|
||||||
create_folder_if_it_doesnt_exist ${SRC}
|
create_folder_if_it_doesnt_exist ${SRC}
|
||||||
|
|
||||||
FILE=../../torrentStream/src/main/jnLibs/${os_arch}eabi-v7a/${SHARED_LIB}
|
FILE=../../torrentStream/src/main/jniLibs/${os_arch}eabi-v7a/${SHARED_LIB}
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "${SHARED_LIB} exists for ${os_arch}eabi-v7a"
|
echo "${SHARED_LIB} exists for ${os_arch}eabi-v7a"
|
||||||
else
|
else
|
||||||
FILE2=bin/release/${os_build}/${os_arch}eabi-v7a/${SHARED_LIB}
|
FILE2=bin/release/${os_build}/${os_arch}eabi-v7a/${SHARED_LIB}
|
||||||
if [ -f "$FILE2" ]; then
|
if [ -f "$FILE2" ]; then
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}eabi-v7a
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}eabi-v7a
|
||||||
cp swig/bin/release/${os_build}/${os_arch}eabi-v7a/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}eabi-v7a/
|
cp swig/bin/release/${os_build}/${os_arch}eabi-v7a/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}eabi-v7a/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
else
|
else
|
||||||
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
||||||
|
@ -45,8 +45,8 @@ else
|
||||||
./run-swig.sh
|
./run-swig.sh
|
||||||
build_libraries
|
build_libraries
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}eabi-v7a
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}eabi-v7a
|
||||||
cp swig/bin/release/${os_build}/${os_arch}eabi-v7a/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}eabi-v7a/
|
cp swig/bin/release/${os_build}/${os_arch}eabi-v7a/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}eabi-v7a/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -26,15 +26,15 @@ sed -i 's/RANLIB = ranlib/RANLIB = "${ANDROID_TOOLCHAIN}\/bin\/aarch64-linux-and
|
||||||
create_folder_if_it_doesnt_exist ${SRC}
|
create_folder_if_it_doesnt_exist ${SRC}
|
||||||
|
|
||||||
|
|
||||||
FILE=../../torrentStream/src/main/jnLibs/${os_arch}-v8a/${SHARED_LIB}
|
FILE=../../torrentStream/src/main/jniLibs/${os_arch}-v8a/${SHARED_LIB}
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "${SHARED_LIB} exists for ${os_arch}-v8a"
|
echo "${SHARED_LIB} exists for ${os_arch}-v8a"
|
||||||
else
|
else
|
||||||
FILE2=bin/release/${os_build}/${os_arch}-v8a/${SHARED_LIB}
|
FILE2=bin/release/${os_build}/${os_arch}-v8a/${SHARED_LIB}
|
||||||
if [ -f "$FILE2" ]; then
|
if [ -f "$FILE2" ]; then
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}-v8a
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}-v8a
|
||||||
cp swig/bin/release/${os_build}/${os_arch}-v8a/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}-v8a/
|
cp swig/bin/release/${os_build}/${os_arch}-v8a/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}-v8a/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
else
|
else
|
||||||
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
||||||
|
@ -46,8 +46,8 @@ else
|
||||||
./run-swig.sh
|
./run-swig.sh
|
||||||
build_libraries
|
build_libraries
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}-v8a
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}-v8a
|
||||||
cp swig/bin/release/${os_build}/${os_arch}-v8a/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}-v8a/
|
cp swig/bin/release/${os_build}/${os_arch}-v8a/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}-v8a/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
|
@ -25,15 +25,15 @@ sed -i 's/RANLIB = ranlib/RANLIB = "${ANDROID_TOOLCHAIN}\/bin\/i686-linux-androi
|
||||||
create_folder_if_it_doesnt_exist ${SRC}
|
create_folder_if_it_doesnt_exist ${SRC}
|
||||||
|
|
||||||
|
|
||||||
FILE=../../torrentStream/src/main/jnLibs/${os_arch}/${SHARED_LIB}
|
FILE=../../torrentStream/src/main/jniLibs/${os_arch}/${SHARED_LIB}
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "${SHARED_LIB} exists for ${os_arch}"
|
echo "${SHARED_LIB} exists for ${os_arch}"
|
||||||
else
|
else
|
||||||
FILE2=bin/release/${os_build}/${os_arch}/${SHARED_LIB}
|
FILE2=bin/release/${os_build}/${os_arch}/${SHARED_LIB}
|
||||||
if [ -f "$FILE2" ]; then
|
if [ -f "$FILE2" ]; then
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}
|
||||||
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}/
|
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
else
|
else
|
||||||
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
||||||
|
@ -49,8 +49,8 @@ else
|
||||||
build_libraries
|
build_libraries
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}
|
||||||
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}/
|
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -26,15 +26,15 @@ create_folder_if_it_doesnt_exist ${SRC}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE=../../torrentStream/src/main/jnLibs/${os_arch}/${SHARED_LIB}
|
FILE=../../torrentStream/src/main/jniLibs/${os_arch}/${SHARED_LIB}
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "${SHARED_LIB} exists for ${os_arch}"
|
echo "${SHARED_LIB} exists for ${os_arch}"
|
||||||
else
|
else
|
||||||
FILE2=bin/release/${os_build}/${os_arch}/${SHARED_LIB}
|
FILE2=bin/release/${os_build}/${os_arch}/${SHARED_LIB}
|
||||||
if [ -f "$FILE2" ]; then
|
if [ -f "$FILE2" ]; then
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}
|
||||||
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}/
|
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
else
|
else
|
||||||
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
prompt_msg "About to prepare BOOST ${BOOST_VERSION}"
|
||||||
|
@ -49,8 +49,8 @@ else
|
||||||
build_libraries
|
build_libraries
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p ../torrentStream/src/main/jnLibs/${os_arch}
|
mkdir -p ../torrentStream/src/main/jniLibs/${os_arch}
|
||||||
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jnLibs/${os_arch}/
|
cp swig/bin/release/${os_build}/${os_arch}/${SHARED_LIB} ../torrentStream/src/main/jniLibs/${os_arch}/
|
||||||
cd swig || exit
|
cd swig || exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
/build
|
/build
|
||||||
|
!/src/main/jniLibs/x86_64/libjlibtorrent.so
|
||||||
|
!/src/main/jniLibs/arm64-v8a/libjlibtorrent.so
|
||||||
|
!/src/main/jniLibs/x86/libjlibtorrent.so
|
||||||
|
!/src/main/jniLibs/armeabi-v7a/libjlibtorrent.so
|
||||||
|
|
|
@ -28,11 +28,6 @@ android {
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
}
|
}
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
jniLibs.srcDirs = ["src/main/jnLibs"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
|
@ -71,4 +66,5 @@ clean {
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
|
implementation project(path: ':frostwire-jlibtorrent')
|
||||||
}
|
}
|
Loading…
Reference in New Issue