Using Manifold with Android Studio

Android Studio’s support for Java 8 features enables Android applications to work directly with Manifold. This document provides configuration information to help you setup your project to use Manifold.

Note, you can also develop Android applications with IntelliJ IDEA using the Android plugin along with the Manifold plugin.

Get the Manifold plugin

Get the Manifold plugin directly from within Android Studio via Settings | Plugins | Marketplace | search "Manifold". You must restart Android Studio to enable the plugin.

Java 8 Source and Target Compatibility

Since Manifold requires Java 8 or later, set your project’s source and target compatibility values to Java 8:

android {

  ...

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Javac Plugin

Add the -Xplugin:Manifold javac argument to connect Manifold with the compiler.

// Manifold Javac plugin
getTasks().withType(JavaCompile) {
    options.compilerArgs += ['-Xplugin:Manifold']
}

Manifold Dependencies

You can conveniently copy/paste from the following list of the latest Manifold dependencies. Do not change the compileOnly and implementation scoping of the dependencies, keep them exactly as they are provided here.

Manifold core

compileOnly 'systems.manifold:manifold:2020.1.17'
implementation 'systems.manifold:manifold-rt:2020.1.17'

Manifold : Extensions

compileOnly 'systems.manifold:manifold-ext:2020.1.17'
implementation 'systems.manifold:manifold-ext-rt:2020.1.17'

Manifold : GraphQL

compileOnly 'systems.manifold:manifold-graphql:2020.1.17'
implementation 'systems.manifold:manifold-graphql-rt:2020.1.17'

Manifold : JSON

compileOnly 'systems.manifold:manifold-json:2020.1.17'
implementation 'systems.manifold:manifold-json-rt:2020.1.17'

Manifold : XML

compileOnly 'systems.manifold:manifold-xml:2020.1.17'
implementation 'systems.manifold:manifold-xml-rt:2020.1.17'

Manifold : YAML

compileOnly 'systems.manifold:manifold-yaml:2020.1.17'
implementation 'systems.manifold:manifold-yaml-rt:2020.1.17'

Manifold : CSV

compileOnly 'systems.manifold:manifold-csv:2020.1.17'
implementation 'systems.manifold:manifold-csb-rt:2020.1.17'

Manifold : Properties

compileOnly 'systems.manifold:manifold-properties:2020.1.17'

Manifold : Image

compileOnly 'systems.manifold:manifold-image:2020.1.17'

Manifold : JavaScript

compileOnly 'systems.manifold:manifold-js:2020.1.17'
implementation 'systems.manifold:manifold-js-rt:2020.1.17'

Manifold : Templates

compileOnly 'systems.manifold:manifold-templates:2020.1.17'
implementation 'systems.manifold:manifold-templates-rt:2020.1.17'

Manifold : String Interpolation

compileOnly 'systems.manifold:manifold-strings:2020.1.17'

Manifold : (Un)checked Exceptions

compileOnly 'systems.manifold:manifold-exceptions:2020.1.17'

Manifold : Preprocessor

compileOnly 'systems.manifold:manifold-preprocessor:2020.1.17'

Manifold : Science

implementation 'systems.manifold:manifold-science:2020.1.17'

Manifold : Collections Extension

implementation 'systems.manifold:manifold-collections:2020.1.17'

Manifold : IO Extensions

implementation 'systems.manifold:manifold-io:2020.1.17'

Manifold : Text Extensions

implementation 'systems.manifold:manifold-text:2020.1.17'

Resources

If you use a type manifold that is based on resource files such as GraphQL, JSON, Templates, etc. you must place the resource files in the source directory along with your Java files. Do not place them in the res or assets directories.

echo method