How run all stages of building Java application under Android SDK?


(aleksg) #1

I have a project build with several modules. Top file build.gradle have directive

allprojects {
apply plugin: ‘java’

I have to leave all submodules as they are but run them under Android SDK- because I have assemble jar file for Android application.
But when I try to add

apply plugin: ‘com.android.application’

I’m getting error about tasks like
"Could not find method compileJava() for arguments … on root project ‘myproject’ of ty
pe org.gradle.api.Project."

because compileJava is task of java plugin.

So what way I can run all stages of building Java application under Android SDK?