Make seedvault compile in AOSP properly
* Add Android.bp to compile using AOSP build system instead of gradle * Add prebuilt external libs that are not available on AOSP Fixes #97 Co-authored-by: Chirayu Desai <chirayudesai1@gmail.com>
This commit is contained in:
parent
e9fd97c41e
commit
fac1eada12
18 changed files with 157 additions and 1 deletions
69
Android.bp
Normal file
69
Android.bp
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
//
|
||||||
|
// Copyright (C) 2018 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
android_app {
|
||||||
|
name: "Seedvault",
|
||||||
|
srcs: [
|
||||||
|
"app/src/main/java/**/*.kt",
|
||||||
|
"app/src/main/java/**/*.java",
|
||||||
|
],
|
||||||
|
resource_dirs: [
|
||||||
|
"app/src/main/res",
|
||||||
|
],
|
||||||
|
static_libs: [
|
||||||
|
"com.google.android.material_material",
|
||||||
|
"androidx.core_core",
|
||||||
|
"androidx.preference_preference",
|
||||||
|
"androidx.lifecycle_lifecycle-extensions",
|
||||||
|
"androidx-constraintlayout_constraintlayout",
|
||||||
|
"seedvault-lib-androidx-core-ktx",
|
||||||
|
"seedvault-lib-androidx-lifecycle-livedata-core-ktx",
|
||||||
|
"seedvault-lib-androidx-lifecycle-livedata-ktx",
|
||||||
|
"seedvault-lib-androidx-lifecycle-viewmodel-ktx",
|
||||||
|
"seedvault-lib-koin-android",
|
||||||
|
"seedvault-lib-koin-androidx-viewmodel",
|
||||||
|
"seedvault-lib-commons-io",
|
||||||
|
"seedvault-lib-koin-core",
|
||||||
|
"seedvault-lib-kotlinx-coroutines-android",
|
||||||
|
"seedvault-lib-kotlinx-coroutines-core",
|
||||||
|
"seedvault-lib-novacrypto-bip39",
|
||||||
|
"seedvault-lib-novacrypto-sha256",
|
||||||
|
"seedvault-lib-novacrypto-toruntime"
|
||||||
|
],
|
||||||
|
manifest: "app/src/main/AndroidManifest.xml",
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
certificate: "platform",
|
||||||
|
privileged: true,
|
||||||
|
required: [
|
||||||
|
"privapp_whitelist_com.stevesoltys.backup",
|
||||||
|
"com.stevesoltys.backup_whitelist"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "privapp_whitelist_com.stevesoltys.backup",
|
||||||
|
sub_dir: "permissions",
|
||||||
|
src: "permissions_com.stevesoltys.seedvault.xml",
|
||||||
|
filename_from_src: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "com.stevesoltys.backup_whitelist",
|
||||||
|
sub_dir: "sysconfig",
|
||||||
|
src: "whitelist_com.stevesoltys.seedvault.xml",
|
||||||
|
filename_from_src: true,
|
||||||
|
}
|
|
@ -108,6 +108,9 @@ def aospDeps = fileTree(include: [
|
||||||
'libcore.jar'
|
'libcore.jar'
|
||||||
], dir: 'libs')
|
], dir: 'libs')
|
||||||
|
|
||||||
|
// If the dependencies below are updated please make sure to update the
|
||||||
|
// prebuilt libraries and Android.bp in the top `libs` folder to reflect that.
|
||||||
|
// You can copy these libraries from ~/.gradle/caches/modules-2
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly aospDeps
|
compileOnly aospDeps
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ git clone --quiet $REPO_URL
|
||||||
cd seedvault-prebuilt
|
cd seedvault-prebuilt
|
||||||
git checkout $TRAVIS_BRANCH || git checkout -b $TRAVIS_BRANCH
|
git checkout $TRAVIS_BRANCH || git checkout -b $TRAVIS_BRANCH
|
||||||
rm -Rf ./*
|
rm -Rf ./*
|
||||||
cp $TRAVIS_BUILD_DIR/Android.mk .
|
cp $TRAVIS_BUILD_DIR/Android.mk.prebuilt ./Android.mk
|
||||||
cp $TRAVIS_BUILD_DIR/app/build/outputs/apk/release/app-release-unsigned.apk ./Seedvault.apk
|
cp $TRAVIS_BUILD_DIR/app/build/outputs/apk/release/app-release-unsigned.apk ./Seedvault.apk
|
||||||
cp $TRAVIS_BUILD_DIR/permissions_com.stevesoltys.seedvault.xml .
|
cp $TRAVIS_BUILD_DIR/permissions_com.stevesoltys.seedvault.xml .
|
||||||
cp $TRAVIS_BUILD_DIR/whitelist_com.stevesoltys.seedvault.xml .
|
cp $TRAVIS_BUILD_DIR/whitelist_com.stevesoltys.seedvault.xml .
|
||||||
|
|
84
libs/Android.bp
Normal file
84
libs/Android.bp
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-lib-androidx-core-ktx",
|
||||||
|
aars: ["core-ktx-1.1.0.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-lib-androidx-lifecycle-livedata-core-ktx",
|
||||||
|
aars: ["lifecycle-livedata-core-ktx-2.3.0-alpha05.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-lib-androidx-lifecycle-livedata-ktx",
|
||||||
|
aars: ["lifecycle-livedata-ktx-2.3.0-alpha05.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-lib-androidx-lifecycle-viewmodel-ktx",
|
||||||
|
aars: ["lifecycle-viewmodel-ktx-2.1.0.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-lib-koin-android",
|
||||||
|
aars: ["koin-android-2.0.1.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-lib-koin-androidx-viewmodel",
|
||||||
|
aars: ["koin-androidx-viewmodel-2.0.1.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-commons-io",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["commons-io-2.6.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-koin-core",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["koin-core-2.0.1.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-kotlinx-coroutines-android",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["kotlinx-coroutines-android-1.1.1.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-kotlinx-coroutines-core",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["kotlinx-coroutines-core-1.3.0.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-novacrypto-bip39",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["BIP39-2019.01.27.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-novacrypto-sha256",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["SHA256-2019.01.27.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-novacrypto-toruntime",
|
||||||
|
host_supported: true,
|
||||||
|
jars: ["ToRuntime-0.9.0.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
BIN
libs/BIP39-2019.01.27.jar
Normal file
BIN
libs/BIP39-2019.01.27.jar
Normal file
Binary file not shown.
BIN
libs/SHA256-2019.01.27.jar
Normal file
BIN
libs/SHA256-2019.01.27.jar
Normal file
Binary file not shown.
BIN
libs/ToRuntime-0.9.0.jar
Normal file
BIN
libs/ToRuntime-0.9.0.jar
Normal file
Binary file not shown.
BIN
libs/commons-io-2.6.jar
Normal file
BIN
libs/commons-io-2.6.jar
Normal file
Binary file not shown.
BIN
libs/core-ktx-1.1.0.aar
Normal file
BIN
libs/core-ktx-1.1.0.aar
Normal file
Binary file not shown.
BIN
libs/koin-android-2.0.1.aar
Normal file
BIN
libs/koin-android-2.0.1.aar
Normal file
Binary file not shown.
BIN
libs/koin-androidx-viewmodel-2.0.1.aar
Normal file
BIN
libs/koin-androidx-viewmodel-2.0.1.aar
Normal file
Binary file not shown.
BIN
libs/koin-core-2.0.1.jar
Normal file
BIN
libs/koin-core-2.0.1.jar
Normal file
Binary file not shown.
BIN
libs/kotlinx-coroutines-android-1.1.1.jar
Normal file
BIN
libs/kotlinx-coroutines-android-1.1.1.jar
Normal file
Binary file not shown.
BIN
libs/kotlinx-coroutines-core-1.3.0.jar
Normal file
BIN
libs/kotlinx-coroutines-core-1.3.0.jar
Normal file
Binary file not shown.
BIN
libs/lifecycle-livedata-core-ktx-2.3.0-alpha05.aar
Normal file
BIN
libs/lifecycle-livedata-core-ktx-2.3.0-alpha05.aar
Normal file
Binary file not shown.
BIN
libs/lifecycle-livedata-ktx-2.3.0-alpha05.aar
Normal file
BIN
libs/lifecycle-livedata-ktx-2.3.0-alpha05.aar
Normal file
Binary file not shown.
BIN
libs/lifecycle-viewmodel-ktx-2.1.0.aar
Normal file
BIN
libs/lifecycle-viewmodel-ktx-2.1.0.aar
Normal file
Binary file not shown.
Loading…
Reference in a new issue