Giter Club home page Giter Club logo

gradle-android-eclipse's People

Contributors

greensopinion avatar mortalis13 avatar rubdos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gradle-android-eclipse's Issues

Usage with Gradle 5

Hello!
That plugin is very useful. Thanks for u work.
Do you plan to optimize it for gradle 5?
I want to set up a project under eclipse with androidx, and am looking for different ways to do this.
Before i used gradle 4 and Gradle EnIDE (nodeclipse) and everything was fine. But google has implemented databinding and androidx in android.tools.build 3.4. This has become a problem for me.
Maybe you know other ways to solve this problem (except Android Studio)?
I would be very grateful for any advice.

The type R/BuildConfig is already defined

After running gradle eclipse and applying the workarounds from #14 and #15, I've got two remaining build errors:

The type BuildConfig is already defined.
The type R is already defined.

This is because andmore (0.5.1) creates these files into the gen folder, and this cannot be disabled afaik. And gradle-android-eclipse generates another set into build/generated/source/r/debug and build/generated/source/buildConfig/debug respectively.

I suggest gradle-android-eclipse should not create the own project's R.java and BuildConfig.java files, since andmore already takes care of this.

submodules support

My project has multiple submodules. Some of them are git submodules(if it is important)
I tried this plugin as shown in the sample. It seemed to me I had to add suggested changes into each module's build.gradle not root project one. So it generates the .project and .classpath locally for each module. So eclipse does not see it.

I did not realize how can I make it generate other modules dependencies and how can I open the full project in Eclipse. Is it supported?

Also Eclipse has the gradle support now days. It would be nice if the changes could be made for the root project build.gradle and plugin will find all project dependencies and generate eclipse gradle project. So it will work in eclipse right form the box.

Build error "Resource '/myproject/bin/default' does not exist."

After running gradle cleanEclipse eclipse and correcting the source folders manually (see #14), I get this remaining build error:

The project was not built due to "Resource '/myproject/bin/default' does not exist."

The corresponding entry in .classpath looks like this:

<classpathentry kind="output" path="bin/default"/>

Why isn't this directory created automatically? Even weirder: If I manually create this directory, within a second it is removed again. Presumably by Eclipse, since Gradle isn't running.

I'm using Eclipse 2019-03 and Andmore 0.5.1.

Logging with slf4j during development

Hi.
I just wonder if logger.info calls actually work on your side?
Cause when I build the plugin it doesn't print anything, only if I change level to error().

Tried to add log4j.properties config file, but didn't help.
Thanks.

Usage with Android Tools 3.2.1

I'm not sure since when it's the case, but apparently the aidl directory got moved, and so did the intermediates directory for the Resource.class files.

Project 'app' is missing required source folder: 'build/generated/source/aidl/debug'	app		Build path	Build Path Problem

I can find the R classes in 'build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/' now, or the sources in build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/. I'm not sure what gradle tasks generate these files though.

This is my current workaround, and you have to remove the aidl directory too if it complains :-)

eclipse {
  classpath {
    plusConfigurations += [
        configurations.eclipseConfig,
        configurations.eclipseTestConfig,
        configurations.eclipseAndroidTestConfig,
    ]
    downloadSources = true

    file {
        beforeMerged { classpath ->
            classpath.entries.add(new org.gradle.plugins.ide.eclipse.model.SourceFolder("build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/", "bin"))
        }
    }
  }
}

Firebase Integration

Hello,
I couldn't integrate firebase in my gradle file.
And face some issues in compiling...could you help me with example ?
Appreciate your reply..

Usage with Gradle 4: `implementation` dependencies et al.

The same issue as with this plugin: since Gradle 4, dependencies specified using compile and testCompile are deprecated, and the successors (implementation and testImplementation) and the like cannot be directly accessed.

But unlike the other AAR plugin, for this one there's a pretty "okay" workaround:

apply plugin: 'com.greensopinion.gradle-android-eclipse'

configurations {
    eclipseConfig.extendsFrom implementation
    eclipseTestConfig.extendsFrom testImplementation
}

eclipse {
  classpath {
    plusConfigurations += [
        configurations.eclipseConfig,
        configurations.eclipseTestConfig,
    ]
    downloadSources = true
  }
}

Seems to do the trick.

src/main/java is hardcoded into .classpath

I am trying to use this plugin to generate eclipse project for android app however my project has a different directory structure. I do have all the source files inside the src directory with no main/java inside.
I do have overridden main.java source set in the build.gradle script, my src path is incuded in the resulting claspath however there's always redundant src/main/java added to the classpath.
It would be nice if this plugin would verify if the hardcoded path is valid before adding it or if it provided enough configuration.

Edit: gradle eclipse plugin is looking at top level sourceSets. Thus I can trick gradle eclipse plugin to add my non-standard path by adding it to the top level main.java source set.
When handling android projects sourceSets is not a top level thing but it's nested inside the android {} block. So adding both sourceSets one at the top level and the other one within the android block is somewhat redundant I think. android specific sourceSet has some more types besides src and resources, so that's another argument why to prefer android specific sourceSets configuration for android projects.
So it would be natural to take the java.srcDirs from each source set defined under android.sourceSets instead of hardcoding src/main/java .
Is this doable?

Until this is not properly addressed here is a dirty way on how I got it to work...
file.beforeMerged { classpath ->
classpath.entries.add(new org.gradle.plugins.ide.eclipse.model.SourceFolder("src", "bin"))
}
file.whenMerged { classpath ->
classpath.entries.removeAll { it.path.endsWith("src/main/java") }
}

Plugin with id 'com.greensopinion.gradle-android-eclipse' not found.

I followed the instructions but when I try to run the gradle eclipse command, I get the output that it can't find that plugin. I believe it should have found it with the Maven repository in the buildscript, but it doesn't seem to work and just bails out with that error.

I don't know gradle as a build system, I'm trying to build the FTC SkyStone android application using eclipse so I'm not entirely sure what to try next to get it to work.

Any assistance would be greatly appreciated.

Deploy to bintray

Android projects use bintray as default. If you deploy your plug-in to bintray, it could be used without additional repository entry.

Support custom source and resource folders

I've got a custom configuration of source and resource folders:

android {
    …
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['libs']
        }
        test {
            java.srcDirs = ['test']
            resources.srcDirs = ['test']
        }
    }
    …
}

This isn't honored by gradle-android-eclipse. It seems to expect the standard src/main/java etc. hierarchy.

Workaround: Edit the .classpath manually after running gradle eclipse.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.