Skip to content
Steve Hannah edited this page Oct 27, 2015 · 8 revisions

Netbeans Instructions

  1. Download latest cn1css-ant-task.jar and copy into your project’s lib directory.

  2. Copy the following snippet into you project’s build.xml file:

        <taskdef name="compileCSS"
            classname="com.codename1.ui.css.CN1CSSCompileTask"
            classpath="lib/cn1css-ant-task.jar"/>
    
        <target name="compile-css">
            <compileCSS/>
        </target>
  3. Change the following line in your project’s build.xml file:

     <target name="-pre-compile">

    to

     <target name="-pre-compile" depends="compile-css">

Now that you have the build script set up to process CSS files, you can add a CSS file to your project and use it in your project. Check out usage instructions for more.

Eclipse Instructions

  1. Download latest cn1css-ant-task.jar and copy into your project’s lib directory.

  2. Copy the following snippet into you project’s build.xml file:

        <taskdef name="compileCSS"
            classname="com.codename1.ui.css.CN1CSSCompileTask"
            classpath="lib/cn1css-ant-task.jar"/>
    
        <target name="compile-css">
            <compileCSS/>
        </target>
  3. Change the following line in your project’s build.xml file:

     <target name="jar">

    to

     <target name="jar" depends="compile-css">

Now that you have the build script set up to process CSS files, you can add a CSS file to your project and use it in your project. Check out usage instructions for more.

Clone this wiki locally