com.github.ginvavilon:android-eclipse

Plugin for generation files for eclipse in android project


License
Apache-2.0

Documentation

Download

This is a plugin for Android Project.

Adding plugin

Add dependencies

buildscript {
    dependencies {
        classpath 'com.github.ginvavilon:android-eclipse:0.9.9'
    }
}

Add plugin android-eclipse after android plugin

apply plugin: 'com.android.application'
apply plugin: 'android-eclipse'

or

apply plugin: 'com.android.library'
apply plugin: 'android-eclipse'

Usage

Available configuration from 'eclipse' plugin

eclipse {

  project {
    //if you don't like the name Gradle has chosen
    name = 'someBetterName'

    //if you want to specify the Eclipse project's comment
    comment = 'Very interesting top secret project'

    //if you want to append some extra referenced projects in a declarative fashion:
    referencedProjects 'someProject', 'someOtherProject'
    //if you want to assign referenced projects
    referencedProjects = ['someProject'] as Set

    //if you want to append some extra natures in a declarative fashion:
    natures 'some.extra.eclipse.nature', 'some.another.interesting.nature'
    //if you want to assign natures in a groovy fashion:
    natures = ['some.extra.eclipse.nature', 'some.another.interesting.nature']

    //if you want to append some extra build command:
    buildCommand 'buildThisLovelyProject'
    //if you want to append a build command with parameters:
    buildCommand 'buildItWithTheArguments', argumentOne: "I'm first", argumentTwo: "I'm second"

    //if you want to create an extra link in the eclipse project,
    //by location uri:
    linkedResource name: 'someLinkByLocationUri', type: 'someLinkType', locationUri: 'file://someUri'
    //by location:
    linkedResource name: 'someLinkByLocation', type: 'someLinkType', location: '/some/location'
  }

 classpath {
    //you can tweak the classpath of the Eclipse project by adding extra configurations:
    plusConfigurations += [ configurations.provided ]

    //you can also remove configurations from the classpath:
    minusConfigurations += [ configurations.someBoringConfig ]

    //if you want to append extra containers:
    containers 'someFriendlyContainer', 'andYetAnotherContainer'

    //customizing the classes output directory:
    defaultOutputDir = file('build-eclipse')

    //default settings for downloading sources and Javadoc:
    downloadSources = true
    downloadJavadoc = false
  }

}

Configuration for plugin:

androidEclipse{

    //Type of link of manifest (disabled,main,generated,merged) or path of link
    manifest = merged

    //Directories for generated source
    generatedDirs-="$buildDir/generated/source/rs"
    
    // Link to res folder
    resLink = res("flavor1")
    //resLink = merged
    
    // Plugin for android ADT, ANDMORE or name (like 'com.android.ide.eclipse.adt')
    pluginType = ANDMORE
    
    // List projects with jar in classpath (duplication of project classpath as jar classpath)
    classpathJarProjects += project(':exampleLibrary')

    // For remove junitTest form classpath
    junitTest = false
}

dependencies {
   //library for eclipse (skip compile)
   androidEclipse 'library'
   
   //library for ignore add to eclipse (only compile)
   ignoreAndroidEclipse 'dependency'

}

Author And License

Copyright 2016, Vladimir Baraznovsky ginVavilon@gmail.com. All rights reserved.

This library may be copied only under the terms of the Apache License 2.0, which may be found in the distribution.