android apk google login
This commit is contained in:
parent
c0eb133c0a
commit
7f13161320
File diff suppressed because one or more lines are too long
@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
id("com.google.gms.google-services")
|
||||
|
||||
@ -12,7 +12,20 @@
|
||||
"package_name": "com.cyberhybridhub.cyberhybridhub"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "155018389717-lhckft64re9khr0udhqhl0e9olejlhd0.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.cyberhybridhub.cyberhybridhub",
|
||||
"certificate_hash": "d0db5c095ef4e70214ff13d62800d884fd059651"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "155018389717-cers33qaak01urmf4sa04s85h7kcocpt.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyA71SkNLrv3tyJQW2DCfe2vFcu1c2opDX8"
|
||||
@ -20,7 +33,19 @@
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "155018389717-cers33qaak01urmf4sa04s85h7kcocpt.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "155018389717-rts8c14thkmu6brn9bkcjj58e4gvk6aq.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.cyberhybridhub.cyberhybridhub"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:label="cyberhybridhub"
|
||||
android:name="${applicationName}"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
# This newDsl flag was added by the Flutter template
|
||||
android.newDsl=false
|
||||
# This builtInKotlin flag was added by the Flutter template
|
||||
# This builtInKotlin flag was added automatically by Flutter migrator
|
||||
android.builtInKotlin=false
|
||||
# This newDsl flag was added automatically by Flutter migrator
|
||||
android.newDsl=false
|
||||
|
||||
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
|
||||
@ -19,8 +19,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "9.0.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
|
||||
id("com.android.application") version "8.9.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
|
||||
id("com.google.gms.google-services") version "4.4.2" apply false
|
||||
}
|
||||
|
||||
|
||||
76
setup_android_sdk.sh
Executable file
76
setup_android_sdk.sh
Executable file
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
|
||||
echo "=== Android SDK Command-Line Tools Installer ==="
|
||||
|
||||
# 1. Install Java (JDK 17) if not present
|
||||
if ! command -v java &> /dev/null; then
|
||||
echo "Java not found. Installing OpenJDK 17..."
|
||||
sudo apt update
|
||||
sudo apt install -y openjdk-17-jdk
|
||||
else
|
||||
echo "Java is already installed: $(java -version 2>&1 | head -n 1)"
|
||||
fi
|
||||
|
||||
# 2. Define SDK Directory
|
||||
SDK_DIR="$HOME/Android/Sdk"
|
||||
mkdir -p "$SDK_DIR/cmdline-tools"
|
||||
|
||||
# 3. Download and Extract Command Line Tools
|
||||
ZIP_URL="https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip"
|
||||
TMP_ZIP="/tmp/commandlinetools.zip"
|
||||
TMP_EXTRACT="/tmp/cmdline-tools-extract"
|
||||
|
||||
echo "Downloading Android Command-Line Tools..."
|
||||
curl -L "$ZIP_URL" -o "$TMP_ZIP"
|
||||
|
||||
echo "Extracting tools..."
|
||||
mkdir -p "$TMP_EXTRACT"
|
||||
unzip -q "$TMP_ZIP" -d "$TMP_EXTRACT"
|
||||
|
||||
# Create the correct directory structure: cmdline-tools/latest/...
|
||||
echo "Configuring directory structure..."
|
||||
mkdir -p "$SDK_DIR/cmdline-tools/latest"
|
||||
# Move files from the nested cmdline-tools folder in the zip
|
||||
cp -r "$TMP_EXTRACT"/cmdline-tools/* "$SDK_DIR/cmdline-tools/latest/"
|
||||
|
||||
# Cleanup temp files
|
||||
rm -rf "$TMP_ZIP" "$TMP_EXTRACT"
|
||||
|
||||
echo "Command line tools successfully installed to $SDK_DIR/cmdline-tools/latest"
|
||||
|
||||
# 4. Set Environment Variables for current session
|
||||
export ANDROID_HOME="$SDK_DIR"
|
||||
export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools"
|
||||
|
||||
# 5. Install SDK Components
|
||||
echo "Installing platform-tools, build-tools, and platform-36..."
|
||||
# We pass "yes" to accept license prompts during sdkmanager installs
|
||||
yes | sdkmanager --licenses || true
|
||||
sdkmanager "platform-tools" "build-tools;28.0.3" "build-tools;35.0.0" "build-tools;36.0.0" "platforms;android-35" "platforms;android-36"
|
||||
|
||||
# 6. Configure Flutter
|
||||
echo "Configuring Flutter to use the new Android SDK and JDK 17..."
|
||||
flutter config --android-sdk "$SDK_DIR"
|
||||
flutter config --jdk-dir "/usr/lib/jvm/java-17-openjdk-amd64"
|
||||
|
||||
# 7. Accept Licenses
|
||||
echo "Accepting licenses with Flutter..."
|
||||
flutter doctor --android-licenses
|
||||
|
||||
# 8. Append environment variables to ~/.bashrc if not already present
|
||||
if ! grep -q "ANDROID_HOME" "$HOME/.bashrc"; then
|
||||
echo "Appending ANDROID_HOME to ~/.bashrc..."
|
||||
cat << 'EOF' >> "$HOME/.bashrc"
|
||||
|
||||
# Android SDK
|
||||
export ANDROID_HOME="$HOME/Android/Sdk"
|
||||
export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools"
|
||||
EOF
|
||||
echo "Added to ~/.bashrc. Please run 'source ~/.bashrc' or restart your terminal after this script finishes."
|
||||
fi
|
||||
|
||||
echo "=== Setup Complete! ==="
|
||||
flutter doctor
|
||||
Loading…
x
Reference in New Issue
Block a user