Monday, October 31, 2016

build android library on command line



android create lib-project --name UnityLibProject --target 1 --path . --package com.ebmajor.unitylib

- create project      : Creates a new Android project.
- create lib-project  : Creates a new Android library project.

UnityLibProject.java:

package com.ebmajor.unitylib;

public class UnityLibProject
{
    public static float GetValue()
    {
        return 1.0f;
    }
}

build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="AndroidPlugin" default="help">

    ... default stuff ...

    <target name="jar" depends="debug">
        <jar
            destfile="bin/UnityLib.jar"
            basedir="bin/classes" />
    </target>

</project>

ant jar




android update lib-project
android update project

android update -h

No comments:

Post a Comment