Skip to content

Commit

Permalink
scaffold new project with basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmohsin7 committed May 29, 2024
1 parent 794b139 commit edefd25
Show file tree
Hide file tree
Showing 225 changed files with 2,601 additions and 11,012 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ migrate_working_dir/
.pub-cache/
.pub/
/build/
/lib/firebase_options.dart

# Symbolication related
app.*.symbols
Expand Down
45 changes: 0 additions & 45 deletions .metadata

This file was deleted.

11 changes: 0 additions & 11 deletions .vscode/settings.json

This file was deleted.

44 changes: 6 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,16 @@ Go to the project directory
```
cd Monumento
```
Monumento requires Flutter version to be less than 3.10.0. If your version is more than 3.10.0, you can follow the below steps or downgrade your local version of Flutter

1. Install [FVM](https://fvm.app)
2. Install Flutter 3.7.12 through FVM
```
fvm install 3.7.12
```
3. Once installed, run the following command to set it as the default version for FVM
```
fvm use 3.7.12
```
4. Now open a terminal and move to the `monumento_module` directory
5. Upgrade the dependencies
```
fvm flutter pub upgrade
```
6. Now try running the app
```
fvm flutter run
```

Follow the official [Firebase guide](https://firebase.google.com/docs/flutter/setup?platform=android) to set it up for this project. This will add the `google-services.json` and `GoogleService-Info.plist` file for android and iOS, and also creates a `firebase_options.dart` file in the lib folder
Install dependencies

Enable [Google Cloud Vision API](https://console.cloud.google.com/marketplace/product/google/vision.googleapis.com) in GCP and generate a private key. In android folder, open `local.properties` file. Create it if it doesn't exist and add the following line
```
cloud.vision.api.key=abcd_your_api_key_here_xyz
```
\
Tip: If you are using VS Code, create `.vscode/seetings.json` file if doen't already exist and add the following lines
flutter pub get
```
{
"dart.flutterSdkPath": "/path/to/fvm/versions/3.7.12", //example path: "/Users/xyz/fvm/versions/3.7.12"
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
}
}
```

Follow the official [Firebase guide](https://firebase.google.com/docs/flutter/setup?platform=android) to set it up for this project. This will add the `google-services.json` and `GoogleService-Info.plist` file for android and iOS, and also creates a `firebase_options.dart` file in the lib folder



## ✌️ Maintainers

Expand Down
4 changes: 2 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
Expand Down
4 changes: 2 additions & 2 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ key.properties
**/*.keystore
**/*.jks

**/google-services.json
**/service-account.json

/app/google-services.json
58 changes: 14 additions & 44 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
// END: FlutterFire Configuration
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +15,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,14 +25,9 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion flutter.compileSdkVersion
namespace "org.aossie.monumento"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand All @@ -46,23 +45,20 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.jddeep.monumento"
applicationId "org.aossie.monumento"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 25
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
buildConfigField("String", "CLOUD_VISION_API_KEY", "\"${System.getenv("cloud.vision.api.key")}\"")
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
Expand All @@ -71,30 +67,4 @@ flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:30.2.0')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation('com.google.api-client:google-api-client-android:1.20.0', {
exclude module: 'httpclient'
exclude group: 'com.google.guava'
})
implementation('com.google.http-client:google-http-client-gson:1.20.0', {
exclude module: 'httpclient'
exclude group: 'com.google.guava'
})
implementation('com.google.apis:google-api-services-vision:v1-rev2-1.21.0', {
exclude module: 'httpclient'
exclude group: 'com.google.guava'
})
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'com.google.ar:core:1.42.0'
implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.17.1'
implementation 'com.google.ar.sceneform:core:1.17.1'
implementation "com.google.ar.sceneform:animation:1.17.1"
implementation 'com.google.ar.sceneform:assets:1.17.1'
}
dependencies {}
21 changes: 0 additions & 21 deletions android/app/proguard-rules.pro

This file was deleted.

3 changes: 1 addition & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jddeep.monumento">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
27 changes: 13 additions & 14 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jddeep.monumento">
<uses-sdk android:minSdkVersion="24" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.ar" />
<application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="monumento"
android:name="${applicationName}"
android:theme="@style/Theme.AppCompat.Light"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand All @@ -29,17 +24,21 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".SceneformFragment" />
<activity android:name=".MonumentDetector" />
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<!-- <meta-data android:name="com.google.ar.core" android:value="required" tools:replace="android:value"/> -->
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
75 changes: 0 additions & 75 deletions android/app/src/main/kotlin/com/jddeep/monumento/MainActivity.kt

This file was deleted.

Loading

0 comments on commit edefd25

Please sign in to comment.