diff --git a/Gemfile b/Gemfile index 7a118b4..cdd3a6b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ source "https://rubygems.org" gem "fastlane" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index 88114a2..8f19748 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,161 +1,163 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) atomos (0.1.3) babosa (1.0.3) claide (1.0.3) colored (1.2) colored2 (3.1.2) commander-fastlane (4.4.6) highline (~> 1.7.2) declarative (0.0.10) declarative-option (0.1.0) digest-crc (0.4.1) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.5) emoji_regex (1.0.1) excon (0.71.1) faraday (0.17.3) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.7) fastlane (2.140.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored commander-fastlane (>= 4.4.6, < 5.0.0) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 2.0) excon (>= 0.71.0, < 1.0.0) faraday (~> 0.17) faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 0.13.1) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-api-client (>= 0.29.2, < 0.37.0) google-cloud-storage (>= 1.15.0, < 2.0.0) highline (>= 1.7.2, < 2.0.0) json (< 3.0.0) jwt (~> 2.1.0) mini_magick (>= 4.9.4, < 5.0.0) multi_xml (~> 0.5) multipart-post (~> 2.0.0) plist (>= 3.1.0, < 4.0.0) public_suffix (~> 2.0.0) rubyzip (>= 1.3.0, < 2.0.0) security (= 0.1.3) simctl (~> 1.6.3) slack-notifier (>= 2.0.0, < 3.0.0) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (>= 1.4.5, < 2.0.0) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-android_versioning (0.5.3) gh_inspector (1.1.3) google-api-client (0.36.4) addressable (~> 2.5, >= 2.5.1) googleauth (~> 0.9) httpclient (>= 2.8.1, < 3.0) mini_mime (~> 1.0) representable (~> 3.0) retriable (>= 2.0, < 4.0) signet (~> 0.12) google-cloud-core (1.5.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) google-cloud-env (1.3.0) faraday (~> 0.11) google-cloud-errors (1.0.0) google-cloud-storage (1.25.1) addressable (~> 2.5) digest-crc (~> 0.4) google-api-client (~> 0.33) google-cloud-core (~> 1.2) googleauth (~> 0.9) mini_mime (~> 1.0) googleauth (0.10.0) faraday (~> 0.12) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.12) highline (1.7.10) http-cookie (1.0.3) domain_name (~> 0.5) httpclient (2.8.3) json (2.3.0) jwt (2.1.0) memoist (0.16.2) mini_magick (4.10.1) mini_mime (1.0.2) multi_json (1.14.1) multi_xml (0.6.0) multipart-post (2.0.0) nanaimo (0.2.6) naturally (2.2.0) os (1.0.1) plist (3.5.0) public_suffix (2.0.5) representable (3.0.4) declarative (< 0.1.0) declarative-option (< 0.2.0) uber (< 0.2.0) retriable (3.1.2) rouge (2.0.7) rubyzip (1.3.0) security (0.1.3) signet (0.12.0) addressable (~> 2.3) faraday (~> 0.9) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) simctl (1.6.7) CFPropertyList naturally slack-notifier (2.3.2) terminal-notifier (2.0.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) tty-cursor (0.7.0) tty-screen (0.7.0) tty-spinner (0.9.2) tty-cursor (~> 0.7) uber (0.1.0) unf (0.1.4) unf_ext unf_ext (0.0.7.6) unicode-display_width (1.6.0) word_wrap (1.0.0) xcodeproj (1.14.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.2.6) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.0) xcpretty (~> 0.2, >= 0.0.7) PLATFORMS ruby DEPENDENCIES fastlane + fastlane-plugin-android_versioning BUNDLED WITH 1.16.1 diff --git a/android/app/build.gradle b/android/app/build.gradle index 93bf1e3..1bf4361 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,201 +1,210 @@ 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.react = [ entryFile: "index.js", enableHermes: false, // clean and rebuild if changing ] 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 } defaultConfig { applicationId "com.agprojects.sylk" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 - versionName "1.0" + versionName "1.0.1" } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } + + release { + if (project.hasProperty('SYLK_UPLOAD_STORE_FILE')) { + storeFile file(SYLK_UPLOAD_STORE_FILE) + storePassword SYLK_UPLOAD_STORE_PASSWORD + keyAlias SYLK_UPLOAD_KEY_ALIAS + keyPassword SYLK_UPLOAD_KEY_PASSWORD + } + } } 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 + signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } // 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, "x86": 2, "arm64-v8a": 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 } } } } dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.facebook.react:react-native:+" // From node_modules 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) diff --git a/android/build.gradle b/android/build.gradle index 28f7ec6..72d8d7a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,38 +1,49 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { buildToolsVersion = "28.0.3" - minSdkVersion = 16 + minSdkVersion = 26 compileSdkVersion = 28 targetSdkVersion = 28 + supportLibVersion = "28.0.0" + } repositories { google() jcenter() } 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 } } - +subprojects { + afterEvaluate { project -> + if (project.hasProperty("android")) { + android { + compileSdkVersion 28 + buildToolsVersion '28.0.3' + } + } + } +} allprojects { repositories { 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") } google() jcenter() maven { url 'https://jitpack.io' } } } diff --git a/api-7060987251070375447-396770-ee04a2a01cae.json b/api-7060987251070375447-396770-ee04a2a01cae.json new file mode 100644 index 0000000..081df7e --- /dev/null +++ b/api-7060987251070375447-396770-ee04a2a01cae.json @@ -0,0 +1,12 @@ +{ + "type": "service_account", + "project_id": "api-7060987251070375447-396770", + "private_key_id": "ee04a2a01cae267064183b1353b53e4cf53f4c23", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDD0dM4atKBpmS9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70tFwKBgCOzowEOph1q9zIAZ4L9oRZ/fzB/fhsmjSuKxxgRVKA9vuiBC4RA\nWgMDwlx+WK7oTqqVdSaAfOl7ULgYBcqlo7V6iJ6EmPQdwB2FCq6+hZiE7IRTC2a9\nlc1H45COCTYoeVgm/8bwid2hbTDSacI6cCp+0QKcUSy4h7kPthUhS1/RAoGALnLg\nENE1hmDXYO8r9GIOSLqzx7M4bGwdyqFk7mGqAVkJGSmRyJNaWY9qOk7vsc8BLFcT\nTwkWTM583xOUKSk1hjEu5Vz0uBqGrX7/B3pXQpOU7HnZrEH9gvGZfpMn/RUDGh7M\n3xWIPRpEsFMePM6Mlayi28feC5CQaz7DJFTcyk0CgYEA1TiCC1Rcjyue5LaMLGK9\nMmHDB+IxOSAP7eWCO8AQpPgSyaQiiRa2RblOAH/YJVJfdoOr+d/DIs6jz4drQUwz\nGiEJi7hUiOuvcruN3Nozvv78o+7VBhkI3u/ehwDjIDz12U0gZUt1FWGqyRnARs22\nuRBcl/3K4f7Y20I6ib7qbTY=\n-----END PRIVATE KEY-----\n", + "client_email": "sylkclient@api-7060987251070375447-396770.iam.gserviceaccount.com", + "client_id": "103686880156945290532", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/sylkclient%40api-7060987251070375447-396770.iam.gserviceaccount.com" + } \ No newline at end of file diff --git a/fastlane/Appfile b/fastlane/Appfile index 2a0a964..19a65a0 100644 --- a/fastlane/Appfile +++ b/fastlane/Appfile @@ -1,8 +1,10 @@ app_identifier("com.agprojects.sylk-ios") # The bundle identifier of your app apple_id("me@dan-jenkins.co.uk") # Your Apple email address itc_team_id("467748") # App Store Connect Team ID team_id("4DFEFUDLKZ") # Developer Portal Team ID # For more information about the Appfile, see: # https://docs.fastlane.tools/advanced/#appfile + +json_key_file "api-7060987251070375447-396770-ee04a2a01cae.json" \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1ba090f..b0f82ae 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,38 +1,56 @@ # This file contains the fastlane.tools configuration # You can find the documentation at https://docs.fastlane.tools # # For a list of all available actions, check out # # https://docs.fastlane.tools/actions # # For a list of all available plugins, check out # # https://docs.fastlane.tools/plugins/available-plugins # fastlane_version '2.140.0' -before_all do - ensure_git_branch - ensure_git_status_clean - git_pull -end +#before_all do +# ensure_git_branch +# ensure_git_status_clean +# git_pull +#end default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do + increment_build_number(xcodeproj: "./ios/sylk.xcodeproj") + build_app(export_xcargs: "-allowProvisioningUpdates", workspace: "./ios/sylk.xcworkspace", scheme: "sylk") + upload_to_testflight + end end platform :android do desc "Push a new beta build to Google Play Store" lane :beta do - gradle(task: 'assemble', build_type: 'Release', project_dir: './android/') - upload_to_play_store(track: 'beta') + + gradle(task: 'clean', project_dir: "android/") # <- Fixes it + + increment_version_code(app_project_dir: '**/app') + increment_version_name( + app_project_dir: '**/app', + bump_type: 'minor' + ) + + gradle(task: 'bundle', build_type: 'Release', project_dir: './android/', properties: { + "android.enableJetifier" => "true", + "android.useAndroidX" => "true" + }) + + upload_to_play_store(track: 'beta', package_name: 'com.agprojects.sylk', skip_upload_apk: true) + end end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 0000000..68498fa --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,5 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-android_versioning' diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt new file mode 100644 index 0000000..4a2cec9 --- /dev/null +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -0,0 +1 @@ +Sylk WebRTC Client, focused on multiparty conferencing, is the companion client for SylkServer. You can use it to create one to one or multy-party sessions using standard SIP adddrsses. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt new file mode 100644 index 0000000..6d4255c --- /dev/null +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -0,0 +1 @@ +Sylk Client is the WebRTC client companion for SylkServer \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 0000000..d726cde --- /dev/null +++ b/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Sylk Client \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/video.txt b/fastlane/metadata/android/en-US/video.txt new file mode 100644 index 0000000..e69de29