Skip to main content

Custom plugin dependencies

Comments

2 comments

  • Richard Moir

    Since you have jar dependencies, it looks like you need to switch over the "folder type" plugin build. So your build target should look something like the follwing, except you need to substitute the "ExtraFiles" paths to copy the necessary jars (e.g. retrofit in your case).

    <target name="build" depends="compile">
    <!--<jar jarfile="${build}/${short-plugin-name}.jar">
    <fileset dir="${classes}"/>
    <fileset dir="">
    <include name="plugin.properties"/>
    </fileset>
    </jar>-->

    <!--build example for folder type plugin. Remove above
    lines and uncomment these to use-->

    <jar jarfile="${build}/${short-plugin-name}.jar">
    <fileset dir="${classes}"/>
    </jar>
    <mkdir dir="${build}/${plugin-name}"/>
    <copy todir="${build}/${plugin-name}">
    <fileset dir="${build}">
    <include name="ExtraFiles"/>
    <include name="ExtraFiles/*"/>
    <include name="${short-plugin-name}.jar"/>
    </fileset>
    <fileset dir="docs">
    <include name="readme.txt"/>
    </fileset>
    </copy>
    </target>
    0
  • Sandra Peters

    Here's how I fixed this problem - I created a folder called ExtraFiles in my project:

    I copied all of my external dependencies (e.g. retrofit-2.5.0.jar) to the ExtraFiles directory and changed my build script as follows:

    <target name="build" depends="compile">
    <jar jarfile="${build}/${short-plugin-name}.jar">
    <fileset dir="${classes}"/>
    </jar>
    <mkdir dir="${build}/${plugin-name}"/>
    <copy todir="${build}/${plugin-name}">
    <fileset dir="${ExtraFiles}">
    <include name="**/*.jar"/>
    </fileset>
    <fileset dir="${build}">
    <include name="${short-plugin-name}.jar"/>
    </fileset>
    </copy>

    </target>

    Running "ant build" generated this folder structure:

     

    I was then able to load the plugin.jar file successfully into Geneious.

     

     

     

    0

Please sign in to leave a comment.