how to get Android-Studio modules name I Intellij Plugin development - java

I want to develop plugin for Android studio for this I am using Intellij idea plugin APIs. For this I need to get project module names in project. Can anyone suggest how i can get list of modules in android studio project using intellij plugin APIs.

com.intellij.openapi.module.ModuleManager#getModules

Related

Linking eclipse project as library to Android studio

Eclipse has this neat feature where you can set one project to build path of another project so that you can separate the two projects as library and the application while maintaining the independence of editing these projects as desired.
This also helps as change in library project is immediately reflected onto application project
Now I want to do something similar for android studio , but the library that my android project is being built on is a java project in eclipse IDE.
Currently what I do is make some changes in library project eclipse then export it as jar file and then import it on android studio.
This is tedious as I want to develop the library project in eclipse alongside the android project and exporting and copying over the jar files manually is slow
Is it possible to do any of the following:
Setup eclipse project such that its build outputs/updates a jar in the libs folder of android project each time project is built in eclipse?
Link the Android studio project's build path to include the eclipse project
Edit the java project on android studio along side the Android project and link them both
Android Studio is the official integrated development environment (IDE) for Google's Android operating system, built based on JetBrains' IntelliJ IDEA software. Android Studio uses Gradle
In answer to your question
You have to understand Build Process with gradle in Android Studio.
You can import your Android project.
And Add your library as a dependency
Create an Android Library
Add as a dependency for your Andriod app modules or other Java projects.
I recommend reading this site.following Site
Projects Overview

Can't run imported gradle android project in Eclipse

First, im new in gradle so please bear with me.
I successfully build and imported this project with gradle & eclipse on ubuntu 13.10. This is what i did :
run gradle build in terminal (success)
add apply plugin: 'eclipse' in the build.gradle
run gradle eclipse in terminal (success)
import it as existing project on eclipse
The problem is, when i tried to run the project, eclipse read it as "normal" java program, not the android one. This is the SS :
The main project in my workspace is not in eclipse format.
And this is its properties :
Notice there's no android tab in it's properties. And i cant run it as android application.
Am i missing something? Please kindly help me.
Thanks for your help.
Usually to develop Android in Eclipse you need to install ADT into Eclipse or start with ADT-Bundle (Android IDE) from Google. (You have not as Preferences missing Android group)
However ADT does not have gradle support. And Android Studio is still not even yet beta (preview or alpha, bleeding edge, need to update with almost every build).
There is Nodeclipse/Enide Gradle for Eclipse
(marketplace), that lets launch gradle build even on general project.
For the latest build.gradle template for classic Android project check
gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.
This lets create new Android project in Eclipse with ADT and use ADT tools for most of things,
but additionally have newer build with gradle
and execute defined gradle tasks
But for Android project with several modules (as in this case) you would need to DIY do it yourself:
try to configure Eclipse .classpath to correct values, as gradle eclipse task won't yet do it all for you.
Eclipse plugin in Gradle that you have used does not support Android projects - they are significantly different from regular Java projects. Some things can work but there will be a lot of things missing including Android nature for generated projects.
And the ADT plugin provided by Google does not support Gradle projects yet as the team focuses on Android Studio first. http://tools.android.com/tech-docs/new-build-system can give you some ideas about the current state.

Android clean way of including other projects? Tool like maven, gradle, etc

I am trying to configure an eclipse project such that it will be easy to import by another programmer, and keep the git repository light. I really like maven for my java ee projects, but i was unable to use it.
For now, my android app need this:
facebook android sdk
google play services
amazon s3 android sdk
support library v4
It seems there is no clean way of doing this, only hacks and workarounds. I am using the eclipse IDE. Any ideas?

Migrating to Android Studio

I want to migrate from Eclipse to Android Studio, but unfortunately Eclipse was crashed so I couldn't build gradle-build files, so I reinstalled Eclipse, and luckily I still had those, I copied my old files which where in my old workspace (the workspace from before the crash) to a new workspace.
But, when I build the gradle-build files now and I import them in Android Studio it says my gridlayout_v7 is missing.
Does anyone of you know how I can solve this?
Run SDK Manager and check that you have installed:
Android Support Repository
Android Support Library
Google Repository
Then check if your build.gradle has next lines:
dependencies {
compile 'com.android.support:gridlayout-v7:18.0.0'
}
You dont need separate gridlayout library subproject anymore with new build system.

Do I need to install an ADT plugin if I want to use Maven?

Is it necessary to download and install ADT plugin into Eclipse, if I want to build all projects using maven?
You might be able to get your project to build by just relying on maven, but you'd miss out on debug tools, Android-specific editors, the simulator, the ADB shell...
For a mavenized android project, if you are talking about build project from commandline, for instance, check out some projects from GitHub and do a mvn clean install, you only need install and setup:
Android SDK
Maven
If you are talking about develop/build project inside IDE like Eclipse, besides Android SDK and Maven, you need the following Eclipse plugins (all available via Eclipse Marketplace), in order to create/import and work on mavenized android project inside Eclipse:
adt
m2e (Maven Integration for Eclipse)
m2e-android (Android Configurator for M2E)
Check out answer here and see screenshot of installed Eclipse plugin.
the ADT plugin is required as It holds the APIs though I am not familiar with maven It would probably be a good idea to install the android ADT to get these APIs. also included in the ADT is the system images and java files needed to build on to create an app.
as I said I am not familiar with maven but I would still recommend installing android ADT

Categories

Resources