mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Add compilation instructions
This commit is contained in:
		
							
								
								
									
										40
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								README.md
									
									
									
									
									
								
							@@ -1,16 +1,38 @@
 | 
			
		||||
# comunic
 | 
			
		||||
 | 
			
		||||
Comunic client
 | 
			
		||||
A Comunic client written with flutter
 | 
			
		||||
 | 
			
		||||
## Getting Started
 | 
			
		||||
## Getting Started on Android
 | 
			
		||||
 | 
			
		||||
This project is a starting point for a Flutter application.
 | 
			
		||||
## Flavors
 | 
			
		||||
 | 
			
		||||
A few resources to get you started if this is your first Flutter project:
 | 
			
		||||
### Application appearance & Title
 | 
			
		||||
* `stable` : For main releases
 | 
			
		||||
* `beta` : For intermediate releases
 | 
			
		||||
 | 
			
		||||
- [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab)
 | 
			
		||||
- [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
 | 
			
		||||
 | 
			
		||||
For help getting started with Flutter, view our 
 | 
			
		||||
[online documentation](https://flutter.io/docs), which offers tutorials, 
 | 
			
		||||
samples, guidance on mobile development, and a full API reference.
 | 
			
		||||
## Build types
 | 
			
		||||
 | 
			
		||||
### Beta
 | 
			
		||||
No special configuration is required. Use the `lib/main_dev.dart` file as entrypoint to the application.
 | 
			
		||||
 | 
			
		||||
### Releases
 | 
			
		||||
To make release builds, the application needs to be signed. Create a file named `key.properties` in the android directory with the following content: 
 | 
			
		||||
```
 | 
			
		||||
storePassword=store password
 | 
			
		||||
keyPassword=key password
 | 
			
		||||
keyAlias=key alias
 | 
			
		||||
storeFile=path to keystore file
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Use the `lib/main_online.dart` as entry point to the application.
 | 
			
		||||
 | 
			
		||||
### Building
 | 
			
		||||
Now choose a flavor and build the application using :
 | 
			
		||||
```sh
 | 
			
		||||
# Generic command
 | 
			
		||||
flutter build apk --flavor BUILD_FLAVOR -t ENTRY_POINT
 | 
			
		||||
 | 
			
		||||
# Example
 | 
			
		||||
flutter build apk --flavor beta -t lib/main_online.dart
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										1
									
								
								android/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								android/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
key.properties
 | 
			
		||||
@@ -24,6 +24,14 @@ if (flutterVersionName == null) {
 | 
			
		||||
apply plugin: 'com.android.application'
 | 
			
		||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// To sign packages
 | 
			
		||||
def keystoreProperties = new Properties()
 | 
			
		||||
def keystorePropertiesFile = rootProject.file('key.properties')
 | 
			
		||||
if (keystorePropertiesFile.exists()) {
 | 
			
		||||
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
android {
 | 
			
		||||
    compileSdkVersion 28
 | 
			
		||||
 | 
			
		||||
@@ -41,11 +49,20 @@ android {
 | 
			
		||||
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    signingConfigs {
 | 
			
		||||
        release {
 | 
			
		||||
            keyAlias keystoreProperties['keyAlias']
 | 
			
		||||
            keyPassword keystoreProperties['keyPassword']
 | 
			
		||||
            storeFile file(keystoreProperties['storeFile'])
 | 
			
		||||
            storePassword keystoreProperties['storePassword']
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
            signingConfig signingConfigs.release
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user