Skip to content
Snippets Groups Projects
Commit e44735c0 authored by Maximilian Betz's avatar Maximilian Betz
Browse files

include .git folder for gradle to access git commit hash info

parent 28b7717b
No related branches found
No related tags found
No related merge requests found
...@@ -9,3 +9,7 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } ...@@ -9,3 +9,7 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
import org.apache.tools.ant.DirectoryScanner
DirectoryScanner.removeDefaultExclude('**/.git')
DirectoryScanner.removeDefaultExclude('**/.git/**')
\ No newline at end of file
...@@ -511,8 +511,7 @@ class EventStoreInstance extends EventStoreBase { ...@@ -511,8 +511,7 @@ class EventStoreInstance extends EventStoreBase {
String gitVersionHash = ''; String gitVersionHash = '';
Future<void> loadGitInfo() async { Future<void> loadGitInfo() async {
//final commitHash = await rootBundle.loadString('.git/refs/heads/main'); final commitHash = await rootBundle.loadString('.git/refs/heads/main');
final commitHash = await rootBundle.loadString('.git/refs/remotes/origin/main');
gitVersionHash = commitHash.substring(0,8); //Use the short version gitVersionHash = commitHash.substring(0,8); //Use the short version
debugPrint("Commit ID: $gitVersionHash"); debugPrint("Commit ID: $gitVersionHash");
......
...@@ -117,7 +117,7 @@ packages: ...@@ -117,7 +117,7 @@ packages:
name: flutter_login name: flutter_login
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "3.2.0"
flutter_secure_storage: flutter_secure_storage:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -190,28 +190,28 @@ packages: ...@@ -190,28 +190,28 @@ packages:
name: geolocator name: geolocator
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "8.1.1" version: "8.2.0"
geolocator_android: geolocator_android:
dependency: transitive dependency: transitive
description: description:
name: geolocator_android name: geolocator_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.2" version: "3.1.4"
geolocator_apple: geolocator_apple:
dependency: transitive dependency: transitive
description: description:
name: geolocator_apple name: geolocator_apple
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.1.1+1"
geolocator_platform_interface: geolocator_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: geolocator_platform_interface name: geolocator_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.2" version: "4.0.4"
geolocator_web: geolocator_web:
dependency: transitive dependency: transitive
description: description:
...@@ -393,7 +393,7 @@ packages: ...@@ -393,7 +393,7 @@ packages:
name: shared_preferences_ios name: shared_preferences_ios
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.10" version: "2.1.0"
shared_preferences_linux: shared_preferences_linux:
dependency: transitive dependency: transitive
description: description:
...@@ -573,7 +573,7 @@ packages: ...@@ -573,7 +573,7 @@ packages:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.11" version: "2.5.1"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
......
...@@ -69,8 +69,8 @@ flutter: ...@@ -69,8 +69,8 @@ flutter:
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
assets: assets:
- assets/awi_logo.png - assets/awi_logo.png
- .git/HEAD # This file points out the current branch of the project. #- .git/HEAD # This file points out the current branch of the project.
- .git/ORIG_HEAD # This file points to the commit id at origin (last commit id of the remote repository). #- .git/ORIG_HEAD # This file points to the commit id at origin (last commit id of the remote repository).
- .git/refs/heads/main - .git/refs/heads/main
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment