CircleCI Android tasks not showing

android

(Clive Jefferies) #1

Hi,
I have a strange problem with Android/Gradle. For some reason different tasks are being picked up by Circle than on my local machine. Here is what I see on CircleCI when I run ‘gradlew tasks’:

init - Initializes a new Gradle build. [incubating]
wrapper - Generates Gradle wrapper files. [incubating]

buildEnvironment - Displays all buildscript dependencies declared in root project 'jdgroup-android'.
components - Displays the components produced by root project 'jdgroup-android'. [incubating]
dependencies - Displays all dependencies declared in root project 'jdgroup-android'.
dependencyInsight - Displays the insight into a specific dependency in root project 'jdgroup-android'.
dependentComponents - Displays the dependent components of components in root project 'jdgroup-android'. [incubating]
help - Displays a help message.
model - Displays the configuration model of root project 'jdgroup-android'. [incubating]
projects - Displays the sub-projects of root project 'jdgroup-android'.
properties - Displays the properties of root project 'jdgroup-android'.
tasks - Displays the tasks runnable from root project 'jdgroup-android' (some of the displayed tasks may belong to subprojects)

These look like default tasks. However on my local machine I can see all my Android tasks:

Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for each variant.
sourceSets - Prints out all the source sets defined in this project.

What I noticed is that when the server is issuing the following command:

export TERM="dumb"
if [ -e ./gradlew ]; then ./gradlew dependencies;else gradle dependencies;fi

I see the following output on my other projects:

Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
[buildinfo] Not using buildInfo properties file for this build.
:dependencies

------------------------------------------------------------
Root project
------------------------------------------------------------

No configurations

BUILD SUCCESSFUL

Total time: 21.329 secs

yet on the CI server, I see:

Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons could not be reused, use --status for details
:dependencies

------------------------------------------------------------
Root project
------------------------------------------------------------

No configurations

BUILD SUCCESSFUL

Total time: 9.103 secs

As far as I can see there is no difference in the gradle versions and project setups for the other projects. I have no idea why this may be happening and any clues would be appreciated.

Clive


(Clive Jefferies) #2

I’m not sure what the issue was, but it had something to do with the Android project itself. I created a new project (the original was an old Eclipse style) and then copied everything back and it started working.