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 [2021/10/15 11:28]
admin
flutterui:build_release [2023/02/22 07:31]
admin
Line 4: Line 4:
  
 ======Build script====== ======Build script======
 +
 +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 iOS build command requires macOS but won't fail if your system is not macOS.
  
 =====Requirements===== =====Requirements=====
  
-Flutter version ''​2.5.2''​ is required.+Java Runtime environment > 8.0
  
-The build script requires Node.js. Simply check versions:+=====Commands=====
  
-  node -v +====Complete (start.complete)====
-  npm -v+
  
-Download and install Node.js: https://nodejs.org/en/ \\ +  cd creator 
 +  ​./build.sh 
 +   
 +or
  
-Run ''​%%npm install%%''​ to install all depending npm packages.+  cd creator 
 +  build.cmd 
 +   
 +====iOS (start.ios)====
  
-**(Windows only)** Add the full path of flutterclient/​node_modules/.bin/ to %PATH% variables.+  cd creator 
 +  ./build.sh start.ios
  
-=====Commands=====+====Android (start.android)====
  
-The results can be found in **deploy** directory.+  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.
  
-====Web====+The **key.properties** will be used to read all relevant information and should contain:
  
-  flutter doctor -v +<code properties>​ 
-  ​flutter config --enable-web+keyAlias=<​alias>​ 
 +keyPassword=<​keypassword>​
  
-Start build +storeFile=<​keystore_filename>​ 
 +storePassword=<​storepassword>​ 
 +</​code>​
  
-  npm run buildweb+To support signing, it's important to change your gradle build in folder //<​project>/​android/​app/​build.gradle//​. We need following changes:
  
-====Android====+<code javascript>​ 
 +def keystoreProperties ​new Properties() 
 +def keystorePropertiesFile ​rootProject.file('​key.properties'​)
  
-  npm run buildandroid +if (keystorePropertiesFile.exists()) { 
-   +    ​keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
-====iOS====+} else { 
 +    keystorePropertiesFile ​rootProject.file('​../​creator/​android/​key.properties'​)
  
-  npm run buildios +    if (keystorePropertiesFile.exists()) { 
-   +        ​keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
-====Build number====+    } else { 
 +        keystorePropertiesFile ​rootProject.file('​../​../​../​android/​key.properties'​)
  
-  npm run increasebuildnumber  ​+        if (keystorePropertiesFile.exists()) { 
 +            keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
 +        } 
 +    } 
 +
 +</​code>​
  
-======Manual======+and
  
-=====Web=====+<code javascript>​ 
 +signingConfigs { 
 +    release { 
 +        keyAlias keystoreProperties['​keyAlias'​] 
 +        keyPassword keystoreProperties['​keyPassword'​] 
 +        storeFile keystoreProperties['​storeFile'​] ? rootProject.file(keystorePropertiesFile.getParent() + '/'​ + keystoreProperties['​storeFile'​]) : null 
 +        storePassword keystoreProperties['​storePassword'​] 
 +    } 
 +}
  
-  flutter doctor -v +buildTypes { 
-  ​flutter config --enable-web +    ​release { 
-   +        ​signingConfig signingConfigs.release 
-Run the web variant:+    } 
 +
 +</​code>​
  
-  flutter run -d chrome ​ +A [[https://​github.com/​sibvisions/​flutter_jvx/​blob/​main/​android/​app/​build.gradle|complete build file]] is available in our project. 
 + 
 +====Web (start.web)==== 
 + 
 +  cd creator 
 +  ./build.sh start.web 
 + 
 +The results will be available in  
 + 
 +  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