Building

Overview

Note: as of June/2020 the flutter gradle build tools still require Java 8 and will NOT work with Java 11.
Sounds contains plugins for both iOS and Android in order to implement core features.
As such you need access to both an iOS and an Android build environment.

Git Clone

Clone the three Sounds related projects under a common root directory:
1
mkdir dev
2
cd dev
3
git clone [email protected]:bsutton/sounds.git
4
git clone [email protected]:bsutton/sounds_common.git
5
​
6
# optional, only required if you need to work on codec conversions.
7
git clone [email protected]:bsutton/sounds_codec.git
Copied!
If you want to locally edit the wiki then you can clone it as well.
1
git clone [email protected]:bsutton/sounds.wiki.git
Copied!

Common configuration

You MUST define FLUTTER_ROOT:
1
export FLUTTER_ROOT=/home/bsutton/apps/flutter
Copied!
You will also need to create a local.properties file in your sounds\android directory with content similar to: (Adjust the paths to match your system.)
sounds\android\local.properties
1
sdk.dir=/home/bsutton/Android/Sdk
2
flutter.sdk=/home/bsutton/apps/flutter
3
flutter.buildMode=debug
4
flutter.versionCode=1
Copied!
And for your example create:
sounds\example\android\local.properties
1
sdk.dir=/home/bsutton/Android/Sdk
2
flutter.sdk=/home/bsutton/apps/flutter
3
flutter.buildMode=debug
4
flutter.versionCode=1
Copied!
If you are going to build sounds_codec then you will need the above local.properties files under the sounds_codec directory. The sounds_common project does NOT require these paths as it does not have any platform specific code.

Visual Code

When I'm working purely on the Dart code in Sounds I prefer to use Visual Code.
You will need to install the dart-code extension and the Flutter extension.

Android Studio

If you need to edit/debug the Java Code then Android Studio is required (Visual Code's Java dev cycle is still crap at this point).

Install the Flutter Plugin

Open 'File | Settings' Find the Plugins entry and the select Flutter from the Marketplace and install it.

Import Sounds

Import Sounds into Android Studio using these instructions​

Building with Android Studio

Initialise the project

Before opening sounds or sounds_codec in Android Studio you MUST first build the example app from the cli.
1
cd sounds\example
2
flutter build apk
3
cd sounds_codec\example
4
flutter build apk
Copied!
You can now import the project into Android Studio.
After importing Sounds into Android Studio you need to ensure the top level 'sounds' directory is selected in your Project view.
To build the Sounds Java Code:
Find the android directory in the Sounds project tree in the IDE.
Right click the android directory and select
`Flutter | Open Android Module in Android Studio'
Wait for Android Studio to sync the Gradle settings. This can take a while.
Once complete select
Build | Make Project
If the Make Project setting is still disabled then the gradle sync probably hasn't finished.

osx

Tools
    java - I used brew to install java.
    xcode - install from the app store.
Once you have installed xcode run:
1
flutter doctor -v
Copied!
Then following the instructions for Xcode to complete xcodes configuration.
Now install cocoapods:
I had trouble after installing cocoapods and had to follow these instructions to install the ruby build tools
Run
1
cd sounds\example
2
flutter build ios --no-codesign
Copied!
Now import the project into xcode and build.
Last modified 6mo ago