diff --git a/Makefile b/Makefile index 564131423..108b46482 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SHELL = /bin/bash +SHELL = /usr/bin/env bash .SHELLFLAGS = -o pipefail -c .PHONY: help diff --git a/app.config.js b/app.config.js index 8ded4c728..1e76cae60 100644 --- a/app.config.js +++ b/app.config.js @@ -44,6 +44,7 @@ module.exports = function (_config) { slug: 'deer', scheme: ['bluesky', 'deer'], // owner: 'blueskysocial', + owner: 'neema.brown', runtimeVersion: { policy: 'appVersion', }, @@ -52,7 +53,7 @@ module.exports = function (_config) { primaryColor: '#1083fe', ios: { supportsTablet: false, - bundleIdentifier: 'xyz.blueskyweb.app', + bundleIdentifier: 'com.deersocial', config: { usesNonExemptEncryption: false, }, @@ -66,7 +67,7 @@ module.exports = function (_config) { 'Used to save images to your library.', NSPhotoLibraryUsageDescription: 'Used for profile pictures, posts, and other kinds of content', - CFBundleSpokenName: 'Blue Sky', + CFBundleSpokenName: 'Deer Social', CFBundleLocalizations: [ 'en', 'an', @@ -156,7 +157,7 @@ module.exports = function (_config) { backgroundColor: '#1185FE', }, googleServicesFile: './google-services.json', - package: 'xyz.blueskyweb.app', + package: 'com.deersocial', intentFilters: [ { action: 'VIEW', @@ -400,7 +401,8 @@ module.exports = function (_config) { }, }, }, - projectId: '55bd077a-d905-4184-9c7f-94789ba0f302', + //projectId: '55bd077a-d905-4184-9c7f-94789ba0f302', + projectId: '7fdb5d99-3996-4a6c-bdf5-b4c1698aa7e6', }, }, }, diff --git a/flake.lock b/flake.lock index b81f50568..261180af0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,99 @@ { "nodes": { + "android-nixpkgs": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1745266877, + "narHash": "sha256-MOEwZIhu3EXSBrtHML04kbb0gII6irVf9YJEMy8MGsU=", + "owner": "tadfisher", + "repo": "android-nixpkgs", + "rev": "3e3987cb51c9ffbd38e62dba0f793940b55a9c07", + "type": "github" + }, + "original": { + "owner": "tadfisher", + "repo": "android-nixpkgs", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "android-nixpkgs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1741473158, + "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=", + "owner": "numtide", + "repo": "devshell", + "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1743583204, "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", @@ -18,8 +111,9 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "systems": "systems" + "android-nixpkgs": "android-nixpkgs", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" } }, "systems": { @@ -36,6 +130,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 7adf892f1..6d8b8050d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,67 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - systems.url = "github:nix-systems/default"; + flake-utils.url = "github:numtide/flake-utils"; + android-nixpkgs.url = "github:tadfisher/android-nixpkgs"; }; outputs = - { nixpkgs, systems, ... }: + { nixpkgs, flake-utils, android-nixpkgs, ... }: + flake-utils.lib.eachDefaultSystem (system: let - forAllSystems = - function: nixpkgs.lib.genAttrs (import systems) (system: function nixpkgs.legacyPackages.${system}); + pkgs = import nixpkgs { + inherit system; + config = { + android_sdk.accept_license = true; + allowUnfree = true; + }; + }; + pinnedJDK = pkgs.jdk17; + androidSdk = android-nixpkgs.sdk.${system} (sdkPkgs: with sdkPkgs; [ + cmdline-tools-latest + build-tools-35-0-0 + build-tools-34-0-0 + platform-tools + platforms-android-35 + emulator + cmake-3-22-1 + ndk-26-1-10909125 + ndk-28-0-13004108 + ]); in + with pkgs; { - packages = forAllSystems (pkgs: { - default = pkgs.callPackage ./default.nix { }; - }); - devShells = forAllSystems (pkgs: { + packages = { + default = callPackage ./default.nix { }; + }; + devShells = { default = - with pkgs; - mkShell { + mkShell rec { + buildInputs = [ + androidSdk + pinnedJDK + ]; + + JAVA_HOME = pinnedJDK; + ANDROID_HOME = "${androidSdk}/share/android-sdk"; + ANDROID_SDK_ROOT = "${androidSdk}/share/android-sdk"; + + GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/35.0.0/aapt2"; + packages = [ just fastmod nodejs yarn crowdin-cli + eas-cli typescript typescript-language-server + ]; + }; - }); - }; + }; + }); } diff --git a/package.json b/package.json index 235b1a91b..d34a818db 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.101.0", "private": true, "engines": { - "node": ">=20" + "node": ">=18" }, "packageManager": "yarn@1.22.22", "scripts": { diff --git a/scripts/bundleUpdate.sh b/scripts/bundleUpdate.sh index 5927a36c8..424cad4c9 100644 --- a/scripts/bundleUpdate.sh +++ b/scripts/bundleUpdate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o errexit set -o pipefail set -o nounset diff --git a/scripts/setGitHubOutput.sh b/scripts/setGitHubOutput.sh index e8ecfcdaf..02a255581 100755 --- a/scripts/setGitHubOutput.sh +++ b/scripts/setGitHubOutput.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash outputIos=$(eas build:version:get -p ios) outputAndroid=$(eas build:version:get -p android) BSKY_IOS_BUILD_NUMBER=${outputIos#*buildNumber - } diff --git a/scripts/updateExtensions.sh b/scripts/updateExtensions.sh index b01134eeb..bb304f6ea 100755 --- a/scripts/updateExtensions.sh +++ b/scripts/updateExtensions.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash IOS_SHARE_EXTENSION_DIRECTORY="./ios/Share-with-Bluesky" IOS_NOTIFICATION_EXTENSION_DIRECTORY="./ios/BlueskyNSE" IOS_APP_CLIP_DIRECTORY="./ios/BlueskyClip" diff --git a/scripts/useBuildNumberEnv.sh b/scripts/useBuildNumberEnv.sh index 2251c0907..9d965c9dd 100755 --- a/scripts/useBuildNumberEnv.sh +++ b/scripts/useBuildNumberEnv.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash outputIos=$(eas build:version:get -p ios) outputAndroid=$(eas build:version:get -p android) BSKY_IOS_BUILD_NUMBER=${outputIos#*buildNumber - } diff --git a/scripts/useBuildNumberEnvWithBump.sh b/scripts/useBuildNumberEnvWithBump.sh index fe273d394..3d28f5426 100755 --- a/scripts/useBuildNumberEnvWithBump.sh +++ b/scripts/useBuildNumberEnvWithBump.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash outputIos=$(eas build:version:get -p ios) outputAndroid=$(eas build:version:get -p android) currentIosVersion=${outputIos#*buildNumber - } @@ -8,4 +8,3 @@ BSKY_IOS_BUILD_NUMBER=$((currentIosVersion+1)) BSKY_ANDROID_VERSION_CODE=$((currentAndroidVersion+1)) bash -c "BSKY_IOS_BUILD_NUMBER=$BSKY_IOS_BUILD_NUMBER BSKY_ANDROID_VERSION_CODE=$BSKY_ANDROID_VERSION_CODE $*" -