diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8afae7b0..08af6e5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,6 +142,7 @@ lint_format_safety_bandit_checks: - $pip install Babel 'bandit<1.6.0' pycodestyle pyflakes 'pylint<2.0' safety - export EXITVALUE=0 - ./hooks/pre-commit || export EXITVALUE=1 + - ./tests/test-gradlew-fdroid || export EXITVALUE=1 - bandit -ii -s B110,B322,B404,B408,B410,B603,B607 diff --git a/tests/scanner.TestCase b/tests/scanner.TestCase index 6017a999..cbaa9de2 100755 --- a/tests/scanner.TestCase +++ b/tests/scanner.TestCase @@ -34,6 +34,7 @@ class ScannerTest(unittest.TestCase): 'firebase-suspect': 1, 'org.mozilla.rocket': 3, 'realm': 1, + 'se.manyver': 2, } for d in glob.glob(os.path.join(source_files, '*')): build = fdroidserver.metadata.Build() diff --git a/tests/source-files/osmandapp/osmand/gradle/wrapper/gradle-wrapper.properties b/tests/source-files/osmandapp/osmand/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..a3185c1e --- /dev/null +++ b/tests/source-files/osmandapp/osmand/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Sep 01 10:23:06 EEST 2014 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip diff --git a/tests/source-files/se.manyver/android/app/build.gradle b/tests/source-files/se.manyver/android/app/build.gradle new file mode 100644 index 00000000..1c77f965 --- /dev/null +++ b/tests/source-files/se.manyver/android/app/build.gradle @@ -0,0 +1,272 @@ +apply plugin: "com.android.application" + +import com.android.build.OutputFile + +/** + * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets + * and bundleReleaseJsAndAssets). + * These basically call `react-native bundle` with the correct arguments during the Android build + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the + * bundle directly from the development server. Below you can see all the possible configurations + * and their defaults. If you decide to add a configuration block, make sure to add it before the + * `apply from: "../../node_modules/react-native/react.gradle"` line. + * + * project.ext.react = [ + * // the name of the generated asset file containing your JS bundle + * bundleAssetName: "index.android.bundle", + * + * // the entry file for bundle generation + * entryFile: "index.android.js", + * + * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format + * bundleCommand: "ram-bundle", + * + * // whether to bundle JS and assets in debug mode + * bundleInDebug: false, + * + * // whether to bundle JS and assets in release mode + * bundleInRelease: true, + * + * // whether to bundle JS and assets in another build variant (if configured). + * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants + * // The configuration property can be in the following formats + * // 'bundleIn${productFlavor}${buildType}' + * // 'bundleIn${buildType}' + * // bundleInFreeDebug: true, + * // bundleInPaidRelease: true, + * // bundleInBeta: true, + * + * // whether to disable dev mode in custom build variants (by default only disabled in release) + * // for example: to disable dev mode in the staging build type (if configured) + * devDisabledInStaging: true, + * // The configuration property can be in the following formats + * // 'devDisabledIn${productFlavor}${buildType}' + * // 'devDisabledIn${buildType}' + * + * // the root of your project, i.e. where "package.json" lives + * root: "../../", + * + * // where to put the JS bundle asset in debug mode + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", + * + * // where to put the JS bundle asset in release mode + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in debug mode + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in release mode + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", + * + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to + * // date; if you have any other folders that you want to ignore for performance reasons (gradle + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ + * // for example, you might want to remove it from here. + * inputExcludes: ["android/**", "ios/**"], + * + * // override which node gets called and with what additional arguments + * nodeExecutableAndArgs: ["node"], + * + * // supply additional arguments to the packager + * extraPackagerArgs: [] + * ] + */ + +project.ext.vectoricons = [ + iconFontNames: [ 'MaterialIcons.ttf', 'MaterialCommunityIcons.ttf' ] +] +project.ext.react = [ + entryFile: "index.android.js", + enableHermes: false, // clean and rebuild if changing + hermesCommand: "../../node_modules/hermes-engine/%OS-BIN%/hermes", +] +apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" +apply from: "../../node_modules/react-native/react.gradle" + +/** + * Set this to true to create two separate APKs instead of one: + * - An APK that only works on ARM devices + * - An APK that only works on x86 devices + * The advantage is the size of the APK is reduced by about 4MB. + * Upload all the APKs to the Play Store and people will download + * the correct one based on the CPU architecture of their device. + */ +def enableSeparateBuildPerCPUArchitecture = false + +/** + * Run Proguard to shrink the Java bytecode in release builds. + */ +def enableProguardInReleaseBuilds = false + +/** + * The preferred build flavor of JavaScriptCore. + * + * For example, to use the international variant, you can use: + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * + * The international variant includes ICU i18n library and necessary data + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that + * give correct results when using with locales other than en-US. Note that + * this variant is about 6MiB larger per architecture than default. + */ +def jscFlavor = 'org.webkit:android-jsc:+' + +/** + * Whether to enable the Hermes VM. + * + * This should be set on project.ext.react and mirrored here. If it is not set + * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode + * and the benefits of using Hermes will therefore be sharply reduced. + */ +def enableHermes = project.ext.react.get("enableHermes", false); + +android { + compileSdkVersion rootProject.ext.compileSdkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + flavorDimensions "store" + + defaultConfig { + versionCode 78 + versionName "0.1911.27-beta" + applicationId "se.manyver" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + missingDimensionStrategy "RNN.reactNativeVersion", "reactNative60" + ndk { + abiFilters "armeabi-v7a", "arm64-v8a" // , "x86", "x86_64" + } + aaptOptions { + ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~' + } + vectorDrawables.useSupportLibrary = true + } + + // dexOptions { + // javaMaxHeapSize "4g" + // } + + productFlavors { + indie { + dimension "store" + } + + googlePlay { + dimension "store" + versionNameSuffix "-googlePlay" + targetSdkVersion rootProject.ext.targetSdkVersionForGooglePlay + } + } + + signingConfigs { + // debug { + // storeFile file('debug.keystore') + // storePassword 'android' + // keyAlias 'androiddebugkey' + // keyPassword 'android' + // } + release { + if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { + storeFile file(MYAPP_RELEASE_STORE_FILE) + storePassword MYAPP_RELEASE_STORE_PASSWORD + keyAlias MYAPP_RELEASE_KEY_ALIAS + keyPassword MYAPP_RELEASE_KEY_PASSWORD + } + } + } + + splits { + abi { + reset() + enable enableSeparateBuildPerCPUArchitecture + universalApk false // If true, also generate a universal APK + include "armeabi-v7a", "arm64-v8a"//, "x86", "x86_64" + } + } + + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + // Caution! In production, you need to generate your own keystore file. + // see https://facebook.github.io/react-native/docs/signed-apk-android. + // signingConfig signingConfigs.debug + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { + signingConfig signingConfigs.release + } + } + } + + // applicationVariants are e.g. debug, release + applicationVariants.all { variant -> + variant.outputs.each { output -> + // For each separate APK per architecture, set a unique version code as described here: + // https://developer.android.com/studio/build/configure-apk-splits.html + def versionCodes = ["armeabi-v7a": 1, "arm64-v8a": 2] //, "x86":3, "x86_64":4] + def abi = output.getFilter(OutputFile.ABI) + if (abi != null) { // null for the universal-debug, universal-release variants + output.versionCodeOverride = + versionCodes.get(abi) * 1048576 + defaultConfig.versionCode + } + } + } +} + +def acraVersion = '5.3.0' + +dependencies { + implementation "ch.acra:acra-core:$acraVersion" + implementation "ch.acra:acra-mail:$acraVersion" + implementation "ch.acra:acra-dialog:$acraVersion" + implementation project(':nodejs-mobile-react-native') + implementation project(':@react-native-community_async-storage') + implementation project(':react-native-bluetooth-socket-bridge') + implementation project(':react-native-bluetooth-status') + implementation project(':react-native-dialogs') + implementation project(':react-native-vector-icons') + implementation project(':react-native-os-staltz') + implementation project(':react-native-randombytes') + implementation project(':react-native-image-crop-picker') + implementation project(':react-native-navigation') + implementation project(':react-native-android-local-notification') + implementation project(':react-native-android-wifi') + implementation project(':react-native-has-internet') + implementation project(':react-native-flag-secure-android') + implementation project(':react-native-orientation-locker') + implementation project(':react-native-fs') + implementation project(':react-native-splash-screen') + implementation project(':@react-native-community_viewpager') + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation("com.facebook.react:react-native:+") { + force = true + } + implementation 'com.facebook.fresco:animated-gif:1.3.0' + + if (enableHermes) { + def hermesPath = "../../node_modules/hermes-engine/android/"; + debugImplementation files(hermesPath + "hermes-debug.aar") + releaseImplementation files(hermesPath + "hermes-release.aar") + } else { + implementation jscFlavor + } +} + +// Run this once to be able to run the application with BUCK +// puts all compile dependencies into folder libs for BUCK to use +task copyDownloadableDepsToLibs(type: Copy) { + from configurations.compile + into 'libs' +} + +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) \ No newline at end of file diff --git a/tests/source-files/se.manyver/android/build.gradle b/tests/source-files/se.manyver/android/build.gradle new file mode 100644 index 00000000..de8f5e77 --- /dev/null +++ b/tests/source-files/se.manyver/android/build.gradle @@ -0,0 +1,64 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + ext { + minSdkVersion = 21 + targetSdkVersion = 26 + targetSdkVersionForGooglePlay = 28 + compileSdkVersion = 28 + } + repositories { + google() + jcenter() + mavenLocal() + mavenCentral() + } + dependencies { + classpath("com.android.tools.build:gradle:3.4.2") + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenCentral() + mavenLocal() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } + maven { + url 'https://maven.google.com' + } + maven { + url "https://jitpack.io" + } + google() + jcenter() + } +} + +subprojects { subproject -> + afterEvaluate { + if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) { + android { + variantFilter { variant -> + def names = variant.flavors*.name + if (names.contains("reactNative51")) setIgnore(true) + if (names.contains("reactNative55")) setIgnore(true) + if (names.contains("reactNative56")) setIgnore(true) + if (names.contains("reactNative57")) setIgnore(true) + if (names.contains("reactNative57_5")) setIgnore(true) + if (names.contains("reactNative57WixFork")) setIgnore(true) + if (names.contains("reactNative59")) setIgnore(true) + } + } + } + } +} diff --git a/tests/source-files/se.manyver/android/gradle.properties b/tests/source-files/se.manyver/android/gradle.properties new file mode 100644 index 00000000..33fd4ac9 --- /dev/null +++ b/tests/source-files/se.manyver/android/gradle.properties @@ -0,0 +1,22 @@ +# 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.useAndroidX=true +android.enableJetifier=true +org.gradle.jvmargs=-Xmx4608M \ No newline at end of file diff --git a/tests/source-files/se.manyver/android/gradle/wrapper/gradle-wrapper.properties b/tests/source-files/se.manyver/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..a14cb8c9 --- /dev/null +++ b/tests/source-files/se.manyver/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip \ No newline at end of file diff --git a/tests/source-files/se.manyver/android/settings.gradle b/tests/source-files/se.manyver/android/settings.gradle new file mode 100644 index 00000000..6a4c91ed --- /dev/null +++ b/tests/source-files/se.manyver/android/settings.gradle @@ -0,0 +1,40 @@ +rootProject.name = 'Manyverse' +apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) +include ':@react-native-community_async-storage' +project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android') +include ':react-native-bluetooth-status' +project(':react-native-bluetooth-status').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bluetooth-status/android') +include ':react-native-bluetooth-socket-bridge' +project(':react-native-bluetooth-socket-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bluetooth-socket-bridge/android') +include ':react-native-image-crop-picker' +project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android') +include ':nodejs-mobile-react-native' +project(':nodejs-mobile-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/nodejs-mobile-react-native/android') +include ':react-native-dialogs' +project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android') +include ':react-native-vector-icons' +project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') +include ':react-native-os-staltz' +project(':react-native-os-staltz').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-os-staltz/android') +include ':react-native-randombytes' +project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android') +include ':react-native-navigation' +project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/') +include ':react-native-android-local-notification' +project(':react-native-android-local-notification').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-local-notification/android') +include ':react-native-android-wifi' +project(':react-native-android-wifi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-wifi/android') +include ':react-native-has-internet' +project(':react-native-has-internet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-has-internet/android') +include ':react-native-flag-secure-android' +project(':react-native-flag-secure-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-flag-secure-android/android') +include ':react-native-orientation-locker', ':app' +project(':react-native-orientation-locker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orientation-locker/android') +include ':react-native-fs' +project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android') +include ':react-native-splash-screen' +project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android') +include ':@react-native-community_viewpager' +project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android') + +include ':app' diff --git a/tests/source-files/se.manyver/app.json b/tests/source-files/se.manyver/app.json new file mode 100644 index 00000000..8931f1dd --- /dev/null +++ b/tests/source-files/se.manyver/app.json @@ -0,0 +1,4 @@ +{ + "name": "Manyverse", + "displayName": "Manyverse" +} diff --git a/tests/source-files/se.manyver/index.android.js b/tests/source-files/se.manyver/index.android.js new file mode 100644 index 00000000..aac66bea --- /dev/null +++ b/tests/source-files/se.manyver/index.android.js @@ -0,0 +1,17 @@ +/* Copyright (C) 2018-2019 The Manyverse Authors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import 'react-native-ssb-shims'; +import {run} from 'cycle-native-navigation'; +import { + screens, + drivers, + welcomeLayout, + defaultNavOptions, +} from './lib/frontend/index'; +// import './snoopy'; // Log and debug the React Native JS<-->Native Bridge + +run(screens, drivers, welcomeLayout, defaultNavOptions); diff --git a/tests/source-files/se.manyver/package.json b/tests/source-files/se.manyver/package.json new file mode 100644 index 00000000..08af1994 --- /dev/null +++ b/tests/source-files/se.manyver/package.json @@ -0,0 +1,135 @@ +{ + "name": "manyverse", + "version": "0.1911.27-beta", + "private": true, + "scripts": { + "postinstall": "patch-package", + "lib": "tsc", + "clean-bundler": "watchman watch-del-all && rm -rf $TMPDIR/react-*", + "clean-android": "adb uninstall se.manyver && cd android && ./gradlew clean", + "full-clean": "npm run clean-android && npm run clean-bundler && rm -rf node_modules && rm -rf lib", + "propagate-replacements": "propagate-replacement-fields --field=react-native", + "build-backend": "./tools/build-backend && ./tools/minify-backend", + "build-android-assets": "npm run lib && npm run propagate-replacements && npm run build-backend", + "build-android-debug": "npm run build-android-assets && react-native run-android --variant=indieDebug", + "build-android-release": "npm run build-android-assets && cd android && ./gradlew assembleRelease && cd ..", + "start": "npm run lib && npm run propagate-replacements && react-native start", + "psdr": "./tools/print-service-desk-report.js", + "test-e2e-android": "./tools/test-e2e-android", + "changelog": "npm run update-repo-changelog && npm run update-dat-latest-readme", + "update-repo-changelog": "./tools/update-repo-changelog.js", + "update-dat-latest-readme": "./tools/update-dat-latest-readme.js", + "echo-ssb-post": "./tools/echo-ssb-post.js", + "update-version": "./tools/update-version.js", + "dat-release": "./tools/dat-release", + "commit-release": "./tools/commit-release", + "release": "npm run update-version && npm run clean-bundler && npm run clean-android && npm run build-android-release && npm run test-e2e-android && npm run changelog && npm run commit-release && npm run dat-release && npm run echo-ssb-post" + }, + "dependencies": { + "@cycle/isolate": "5.1.0", + "@cycle/react": "2.6.0", + "@cycle/run": "5.3.0", + "@cycle/state": "1.3.0", + "@react-native-community/viewpager": "3.1.0", + "@types/node": "~12.7.5", + "@types/react": "16.9.x", + "@types/react-native": "0.60.23", + "@types/react-native-vector-icons": "6.4.3", + "buffer": "5.4.3", + "color-hash": "1.0.3", + "cycle-native-alert": "1.1.0", + "cycle-native-android-local-notification": "1.1.0", + "cycle-native-asyncstorage": "2.0.0", + "cycle-native-clipboard": "1.0.0", + "cycle-native-keyboard": "1.2.0", + "cycle-native-linking": "1.1.0", + "cycle-native-navigation": "6.1.0", + "cycle-native-share": "1.1.0", + "cycle-native-toastandroid": "1.1.0", + "mdast-normalize-react-native": "3.2.x", + "nodejs-mobile-react-native": "0.5.0", + "path": "~0.12.7", + "promisify-tuple": "1.0.0", + "pull-flat-list": "2.10.0", + "pull-pushable": "2.2.0", + "pull-stream": "3.6.14", + "pull-thenable": "1.0.0", + "react": "16.9.0", + "react-human-time": "^1.1.0", + "react-markdown": "4.0.2", + "react-native": "0.61.5", + "react-native-android-local-notification": "3.0.0", + "react-native-android-wifi": "0.0.41", + "react-native-bluetooth-socket-bridge": "1.2.0", + "react-native-bluetooth-status": "1.3.0", + "react-native-dialogs": "1.1.0", + "react-native-flag-secure-android": "1.0.2", + "react-native-floating-action": "1.19.1", + "react-native-fs": "~2.16.2", + "react-native-has-internet": "4.0.0", + "react-native-image-crop-picker": "~0.26.1", + "react-native-image-view": "~2.1.6", + "react-native-navigation": "4.0.2", + "react-native-orientation-locker": "1.1.7", + "react-native-popup-menu": "0.15.6", + "react-native-splash-screen": "^3.2.0", + "react-native-ssb-client": "7.0.0", + "react-native-ssb-shims": "4.6.0", + "react-native-swiper": "1.5.14", + "react-native-vector-icons": "6.6.0", + "react-propify-methods": "16.3.1", + "react-xstream-hoc": "1.0.0", + "remark": "~9.0.0", + "remark-gemoji-to-emoji": "1.1.0", + "remark-images-to-ssb-serve-blobs": "2.1.0-1", + "remark-linkify-regex": "1.0.0", + "remark-ssb-mentions": "~2.0.0", + "rn-viewpager": "1.2.9", + "ssb-cached-about": "~1.0.0", + "ssb-conn-query": "~0.4.4", + "ssb-ref": "2.13.9", + "ssb-room": "~1.1.1", + "ssb-serve-blobs": "2.1.0", + "ssb-threads": "3.6.0", + "ssb-typescript": "1.4.0", + "xstream": "11.11.0", + "xstream-backoff": "1.0", + "xstream-between": "1.0", + "xstream-from-callback": "1.0", + "xstream-from-pull-stream": "1.1", + "xstream-sample": "1.0" + }, + "devDependencies": { + "@babel/core": "~7.7.2", + "@babel/runtime": "~7.7.2", + "add-stream": "~1.0.0", + "conventional-changelog": "~3.1.15", + "husky": "^3.1.0", + "into-stream": "~5.1.1", + "jase": "1.2.0", + "left-pad": "1.3.0", + "metro-react-native-babel-preset": "^0.56.0", + "patch-package": "6.2.0", + "prettier": "~1.19.1", + "pretty-quick": "~2.0.1", + "propagate-replacement-fields": "1.2.0", + "react-native-version": "3.2.0", + "rn-snoopy": "2.0.2", + "tslint": "~5.20.1", + "typescript": "~3.7.2" + }, + "optionalDependencies": { + "appium": "1.14.0", + "tap-spec": "5.0.0", + "tape": "~4.9.1", + "wd": "1.11.3" + }, + "husky": { + "hooks": { + "pre-commit": "pretty-quick --staged --pattern \"**/*.*(ts|tsx|js|jsx)\"" + } + }, + "react-native": { + "os": "react-native-os-staltz" + } +} diff --git a/tests/source-files/se.manyver/react-native.config.js b/tests/source-files/se.manyver/react-native.config.js new file mode 100644 index 00000000..26adf2e4 --- /dev/null +++ b/tests/source-files/se.manyver/react-native.config.js @@ -0,0 +1,18 @@ +module.exports = { + dependencies: { + 'nodejs-mobile-react-native': { + // Ignored because we need to set this up manually in order to + // call some APIs of this library directly in our MainActivity.java + platforms: { + android: null, + }, + }, + 'react-native-bluetooth-socket-bridge': { + // This package needs some config passed as arguments to the constructor + // so we need to "link" it manually in MainApplication.java + platforms: { + android: null, + }, + }, + }, +}; diff --git a/tests/test-gradlew-fdroid b/tests/test-gradlew-fdroid new file mode 100755 index 00000000..d7f9884b --- /dev/null +++ b/tests/test-gradlew-fdroid @@ -0,0 +1,26 @@ +#!/bin/bash + +run_test() { + red='\033[0;31m' + green='\033[0;32m' + nocolor='\033[0m' + cd $basedir/tests/source-files/$1 + printf "\n${1}:\n" + if ($basedir/gradlew-fdroid 2>/dev/null || true) | grep -Fo "$2"; then + printf "${green}passed: $1\n" + else + printf "${red}ERROR: $2 not found in $1\n" + ((exit_value++)) + fi + printf $nocolor +} + +exit_value=0 +basedir=$(cd $(dirname $0)/..; pwd) +export https_proxy=127.7.7.7:7 # fake proxy to block downloading + +run_test osmandapp/osmand 2.2.1 +run_test com.integreight.onesheeld 3.3 +run_test se.manyver/android 5.5 + +exit $exit_value