Houzi Docs logo Houzi Docs

Always make a backup before updating to the next version.

Migration Guide for 1.4.2

Important Notice: If you are updating from version lower than 1.4.0, we recommend you to first perform the migration for 1.4.0, then migrate to 1.4.2.

We always assume, you haven’t made changes to files in houzi_package. If you made changes in your houzi_package then you’ll need to move over those manually (again).

Let’s assume you simply want to update your houzi_package, updating to 1.4.2 requires you following things:

  subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"

    // add this line for onesignal_flutter to work in android device
    afterEvaluate {
        android {
            compileSdkVersion 34
        }
    }
}

Migration Guide for 1.4.0

We always assume, you haven’t made changes to files in houzi_package. If you made changes in your houzi_package then you’ll need to move over those manually (again).

Easier Path: Although we’ve listed almost all the steps to migrate your existing Flutter Project to push notification and Android Gradle Plugin migration. We think, configuring new project in 1.4.0 may be easier path than doing the migration.

Let’s assume you simply want to update your houzi_package, updating to 1.4.0 requires you following things:

Push Notification with OneSignal

We have provide support for the push notifications in the Houzi 1.4.0 release. You need to perform following configurtion to enable push notifications in your existing apps.

 <string name="onesignal_app_id">YOUR_ONESIGNAL_APP_ID_OR_EMPTY</string>
  implementation 'com.onesignal:OneSignal:5.1.13'

Migration to Android Studio Jellyfish

There are some additional configurations if you want to run your project on new Android Studio Jellyfish.

  1. Go to project settings.gradle file by following this path:

    Project_HOME > android > settings.gradle

    Replace the plugins block with the following one:

     plugins {
         id "dev.flutter.flutter-plugin-loader" version "1.0.0"
         id "com.android.application" version '8.4.0' apply false
         id "org.jetbrains.kotlin.android" version '1.9.23' apply false
         id "com.google.gms.google-services" version "4.3.8" apply false
     }
    
  2. Go to app build.gradle file by following this path:

    Project_HOME > android > app > build.gradle

    Perform following modifications:

    a. Add your namespace in android block as following:

     android {
         namespace "com.example.app"
         ...
     }
    

    b. Replace the release block in the buildTypes block with the following:

     release {
         signingConfig signingConfigs.release
         minifyEnabled true
    
         proguardFiles(
             getDefaultProguardFile("proguard-android-optimize.txt"),
             // List additional ProGuard rules for the given build type here. By default,
             // Android Studio creates and includes an empty rules file for you (located
             // at the root directory of each module).
             "proguard-rules.pro"
         )
     }
    

    c. Add following compileOptions block and kotlinOptions block in the android block as following:

     android {
         ...
         compileOptions {
             // Flag to enable support for the new language APIs
             coreLibraryDesugaringEnabled true
             // Sets Java compatibility to Java 8
             sourceCompatibility JavaVersion.VERSION_1_8
             targetCompatibility JavaVersion.VERSION_1_8
         }
         kotlinOptions {
             jvmTarget = "1.8"
         }
         ...
     }
    

    d. Add following dependency in dependencies block

     dependencies {
         ...
             coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
         ...
     }
    

    e. Replace the 1.9.10 with 1.9.23 in following dependency of dependencies block

     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10" [OLD]
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23" [UPDATED]
    
  3. Copy the file progurad-rules.pro from the PROJECT_HOME > android > app > progurad-rules.pro and paste it in the app folder (path: PROJECT_HOME > android > app) of your project.

  4. Go to app AndroidManifest.xml file by following this path:

    Project_HOME > android > app > src > main > AndroidManifest.xml

    Perform following modifications:

    a. Add following code line in the tag at the start of the file:

     xmlns:tools="http://schemas.android.com/tools"
    

    e.g.
    *Before:

     <manifest
         xmlns:android="http://schemas.android.com/apk/res/android"
         package="com.example.app">
    

    *After:

     <manifest
         xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:tools="http://schemas.android.com/tools"
         package="com.example.app">
    

    b. Just before the closing of tag add the following block of code:

     <property
         android:name="android.adservices.AD_SERVICES_CONFIG"
         android:resource="@xml/gma_ad_services_config"
         tools:replace="android:resource"/>
    
  5. Go to gradle-wrapper.properties file by following this path:

    Project_HOME > android > gradle > wrapper > gradle-wrapper.properties

    Replace the distributionUrl with following one:

    https://services.gradle.org/distributions/gradle-8.6-all.zip

  6. Go to packagepubspec.yaml file by following this path:

    Project_HOME > packages > houzi_package > pubspec.yaml

    Update the following dependencies accordingly:

     google_mobile_ads: 5.0.0  
     webview_flutter: 4.7.0  
     flutter_local_notifications: 17.1.1
    
  7. Go to the project build.gradle file by following this path:

    Project_HOME > android > build.gradle

Add following code below the allprojects block

    subprojects {
        afterEvaluate { project ->
            if (project.hasProperty('android')) {
                project.android {
                    if (namespace == null) {
                        namespace project.group
                    }
                }
            }
        }
    }

Migration Guide 1.3.9.1

We always assume, you haven’t made changes to files in houzi_package. If you made changes in your houzi_package then you’ll need to move over those manually (again). Let’s assume you simply want to update your houzi_package, updating to 1.3.9.1 requires you following things:


Migration Guide 1.3.9

We always assume, you haven’t made changes to files in houzi_package. If you made changes in your houzi_package then you’ll need to move over those manually (again). Let’s assume you simply want to update your houzi_package, updating to 1.3.9 requires you following things:

Previous: Setup Deep Link Next: Tools Setup