aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-05-12 17:44:15 +0530
committerAkshay Nair <phenax5@gmail.com>2024-09-29 16:16:38 +0530
commit55aef19e3a08b1c87aab6c9c16c20ea9da309029 (patch)
treec6417f169726d8b96f9fa30dd982249161d7a55b
parent8ca8f830a09d8ff08ccb654199cb33779117cc37 (diff)
downloaddaft-launcher-55aef19e3a08b1c87aab6c9c16c20ea9da309029.tar.gz
daft-launcher-55aef19e3a08b1c87aab6c9c16c20ea9da309029.zip
Build schtuff
-rw-r--r--.envrc1
-rw-r--r--.eslintrc.js3
-rw-r--r--babel.config.js1
-rwxr-xr-xbun.lockbbin363711 -> 391227 bytes
-rw-r--r--flake.lock61
-rw-r--r--flake.nix68
-rw-r--r--justfile9
-rw-r--r--nativewind-env.d.ts1
-rw-r--r--package.json7
-rw-r--r--tailwind.config.js8
10 files changed, 158 insertions, 1 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..3550a30
--- /dev/null
+++ b/.envrc
@@ -0,0 +1 @@
+use flake
diff --git a/.eslintrc.js b/.eslintrc.js
index 187894b..ebc44e4 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,4 +1,7 @@
module.exports = {
root: true,
extends: '@react-native',
+ rules: {
+ curly: 0,
+ },
};
diff --git a/babel.config.js b/babel.config.js
index f7b3da3..9b9a4fe 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
+ plugins: ['nativewind/babel'],
};
diff --git a/bun.lockb b/bun.lockb
index 8fb5495..1f0dfd2 100755
--- a/bun.lockb
+++ b/bun.lockb
Binary files differ
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..8d51a6b
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,61 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1715346633,
+ "narHash": "sha256-A9vSieOHR7B41QoWZcb7fEY7r29E4Vq3liXE0h0edf0=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "d42c1c8d447a388e1f2776d22c77f5642d703da6",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ },
+ "systems": {
+ "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",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..fa53718
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,68 @@
+{
+ inputs = {
+ flake-utils.url = "github:numtide/flake-utils";
+ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ };
+
+ outputs = { self, nixpkgs, flake-utils, ... }:
+ let
+ androidVersion = "34";
+ systemImageType = "google_apis_playstore";
+ abiVersion = "x86_64";
+ buildToolVersion = "34.0.0";
+
+ shell = { pkgs, system }: let
+ jdk = pkgs.jdk17;
+
+ androidComposition = pkgs.androidenv.composeAndroidPackages {
+ includeEmulator = true;
+ platformVersions = [ androidVersion ];
+ abiVersions = [ "x86" abiVersion ];
+ systemImageTypes = [ systemImageType ];
+ includeSystemImages = true;
+ useGoogleAPIs = true;
+ buildToolsVersions = [ "30.0.3" buildToolVersion ];
+ includeNDK = true;
+ ndkVersion = "23.1.7779620";
+ cmakeVersions = [ "3.22.1" ];
+ };
+ in pkgs.mkShell rec {
+ buildInputs = with pkgs; [
+ bun
+ nodePackages."@tailwindcss/language-server"
+ nodePackages.typescript
+ nodePackages.typescript-language-server
+
+ androidComposition.androidsdk
+ androidComposition.platform-tools
+ jdk
+ just
+ ];
+
+ JAVA_HOME = "${jdk.home}";
+ ANDROID_JAVA_HOME = JAVA_HOME;
+ ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk";
+ ANDROID_AVD_HOME = "/home/imsohexy/.config/.android/avd";
+
+ MY_ANDROID_AVD_PKG = "system-images;android-${androidVersion};${systemImageType};${abiVersion}";
+
+ GRADLE_OPTS =
+ "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${buildToolVersion}/aapt2";
+ };
+ in
+ flake-utils.lib.eachDefaultSystem
+ (system:
+ let
+ pkgs = import nixpkgs {
+ inherit system;
+ config = {
+ android_sdk.accept_license = true;
+ licenseAccepted = true;
+ allowUnfree = true;
+ };
+ };
+ in
+ {
+ devShells.default = shell { inherit pkgs system; };
+ });
+}
diff --git a/justfile b/justfile
new file mode 100644
index 0000000..b85492a
--- /dev/null
+++ b/justfile
@@ -0,0 +1,9 @@
+
+android-setup:
+ #!/usr/bin/env sh
+ sdkmanager "$MY_ANDROID_AVD_PKG" && \
+ avdmanager create avd -n channels -k "$MY_ANDROID_AVD_PKG" --device 26 --force;
+
+emu:
+ emulator -gpu swiftshader_indirect @channels
+ # emulator -gpu mode @channels
diff --git a/nativewind-env.d.ts b/nativewind-env.d.ts
new file mode 100644
index 0000000..a13e313
--- /dev/null
+++ b/nativewind-env.d.ts
@@ -0,0 +1 @@
+/// <reference types="nativewind/types" />
diff --git a/package.json b/package.json
index 25eafd6..13ababc 100644
--- a/package.json
+++ b/package.json
@@ -10,8 +10,13 @@
"test": "jest"
},
"dependencies": {
+ "match-sorter": "^6.3.4",
+ "nativewind": "^2.0.11",
"react": "18.2.0",
- "react-native": "0.74.1"
+ "react-native": "0.74.1",
+ "react-native-launcher-kit": "^1.0.4",
+ "react-native-swiper": "^1.6.0",
+ "tailwindcss": "3.3.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
diff --git a/tailwind.config.js b/tailwind.config.js
new file mode 100644
index 0000000..139656f
--- /dev/null
+++ b/tailwind.config.js
@@ -0,0 +1,8 @@
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+ content: ['./App.tsx', './src/**/*.{js,jsx,ts,tsx}'],
+ theme: {
+ extend: {},
+ },
+ plugins: [],
+};