Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
flutterui:build_release [2020/08/13 15:39]
admin
flutterui:build_release [2023/02/22 07:31] (current)
admin
Line 3: Line 3:
 ~~NOPDF~~ ~~NOPDF~~
  
-==Build script==+======Build script======
  
-==Requirements==+The build script is available in the **creator** directory. The script is [[https://​ant.apache.org/​|Apache ANT]] based and it's a simple XML file. It defines several build commands. The default command (start.complete) creates output for iOS, Android and Web deployment.
  
-The build script ​requires ​Node.js and perl. Simply check versions:+The iOS build command ​requires ​macOS but won't fail if your system is not macOS.
  
-  node -v +=====Requirements===== 
-  ​npm -v+ 
 +Java Runtime environment > 8.0 
 + 
 +=====Commands===== 
 + 
 +====Complete (start.complete)==== 
 + 
 +  cd creator 
 +  ​./build.sh
   ​   ​
-  perl -v+or
  
-Download and install Node.js: https://​nodejs.org/​en/​ \\  +  cd creator 
-Download install Perl: https://​www.perl.org/​get.html+  build.cmd 
 +   
 +====iOS (start.ios)====
  
-Run ''​%%npm install%%''​ to install all depending npm packages.+  cd creator 
 +  ​./build.sh start.ios
  
-**(Windows only)** Add the full path of flutterclient/​node_modules/​.bin/​ to %PATH% variables.+====Android ​(start.android)====
  
-==Commands==+  cd creator 
 +  ./build.sh start.android 
 +   
 +For app signing, a keystore will be used. Our build process needs a file with the name **key.properties**. Put this file in the folder ​  
 +//<​project>/​creator/​android//,​ together with your keystore. It's also possible to put the file in your android project folder. We support both locations.
  
-The results can be found in **deploy** directory.+The **key.properties** will be used to read all relevant information and should contain:
  
-=== Web ===+<code properties>​ 
 +keyAlias=<​alias>​ 
 +keyPassword=<​keypassword>​
  
-Currently, beta channel is required for Flutter WEB:+storeFile=<​keystore_filename>​ 
 +storePassword=<​storepassword>​ 
 +</​code>​
  
-  flutter channel beta +To support signing, it's important to change your gradle build in folder //<​project>/​android/​app/​build.gradle//​. We need following changes:
-  flutter doctor -v +
-  flutter config --enable-web+
  
-Start build +<code javascript>​ 
 +def keystoreProperties = new Properties() 
 +def keystorePropertiesFile = rootProject.file('​key.properties'​)
  
-  npm run buildweb+if (keystorePropertiesFile.exists()) { 
 +    keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
 +} else { 
 +    keystorePropertiesFile = rootProject.file('​../​creator/​android/​key.properties'​)
  
-=== Android ===+    if (keystorePropertiesFile.exists()) { 
 +        keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
 +    } else { 
 +        keystorePropertiesFile ​rootProject.file('​../​../​../​android/​key.properties'​)
  
-  npm run buildandroid +        if (keystorePropertiesFile.exists()) { 
-   +            ​keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
-=== iOS ===+        } 
 +    } 
 +
 +</​code>​
  
-  npm run buildios +and
-   +
-==Other==+
  
-===Build number===+<code javascript>​ 
 +signingConfigs { 
 +    release { 
 +        keyAlias keystoreProperties['​keyAlias'​] 
 +        keyPassword keystoreProperties['​keyPassword'​] 
 +        storeFile keystoreProperties['​storeFile'​] ? rootProject.file(keystorePropertiesFile.getParent() + '/'​ + keystoreProperties['​storeFile'​]) : null 
 +        storePassword keystoreProperties['​storePassword'​] 
 +    } 
 +}
  
-  npm run increasebuildnumber  ​+buildTypes { 
 +    release { 
 +        signingConfig signingConfigs.release 
 +    } 
 +
 +</​code>​
  
-==Manual==+A [[https://​github.com/​sibvisions/​flutter_jvx/​blob/​main/​android/​app/​build.gradle|complete build file]] is available in our project.
  
-===Web===+====Web ​(start.web)====
  
-Currently, beta channel is required for Flutter WEB:+  cd creator 
 +  ./build.sh start.web
  
-  flutter channel beta +The results will be available in 
-  flutter doctor -v +
-  flutter config --enable-web +
-   +
-Run the web variant:+
  
-  ​flutter run -d chrome  ​+  ​creator/​build/​install
   ​   ​
-Build the release:+directory. 
 + 
 +=====Updates===== 
 + 
 +To get the latest build script, simply call
  
-  ​flutter build web+  ​cd creator 
 +  ./update.sh
   ​   ​
-The result can be found in **build/​web** ​directory.+The latest [[https://​raw.githubusercontent.com/​sibvisions/​flutterclient/​main/​creator/​build.xml|build.xml]] will be saved in the creator ​directory.
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information