gradle-plugin-git-dependencies icon indicating copy to clipboard operation
gradle-plugin-git-dependencies copied to clipboard

Incompatible with Android plugin?

Open wjwarren opened this issue 12 years ago • 42 comments

Hey,

When I try to use a dependency with the android plugin applied, the build fails. It only fails when the dependency doesn't exist in the local Maven repo.

build.gradle snippet:

android {
    ...

    dependencies {
        compile('org.batcha:dummy-project-a:4.2').ext.git = 'https://github.com/bat-cha/dummy-java-project-a.git'
    }
}

gradle output:

FAILURE: Build failed with an exception.

What went wrong: Could not resolve all dependencies for configuration ':compile'. Could not find group:org.batcha, module:dummy-project-a, version:4.2. ...

I ran the build script with the --info and --stackTrace flags, but they didn't seem to provide any more information on where exactly things went wrong. I can post the output later if you want.

Cheers,

Wijnand

PS: My build script dependency is to the locally built git-dependencies-0.1.jar that has #3 fixed.

wjwarren avatar Feb 19 '13 13:02 wjwarren

Hey,

OK I've never used android plugin so far, I'll have a look on a dummy test project

I'll notifiy if I found something....

PS: I plan to deliver a v0.2 when I have a little bit more time that could be more verbose on where things can eventually go wrong (clone/pull from git repo or mavenLocal install....) and with more options (like refresh only if not found in mavenLocal or stuff like that... any ideas more than welcome)

bat-cha avatar Feb 19 '13 13:02 bat-cha

No worries, let me know if you need some help setting up an Android test project.

I can't think of any other features that would be nice to have in a 0.2 release. If I come up with something, I'll open a new ticket :wink:

wjwarren avatar Feb 19 '13 13:02 wjwarren

ok I had a quick look and it seems that some assumptions of the git-dependencies plugin are no longer valid if you're applying the android plugin, I will get a closer look a little bit later and I'll keep you updated if I found a way to make it compatible

Cheers

bat-cha avatar Feb 19 '13 14:02 bat-cha

Out of curiosity, what assumptions are you talking about? The "compileJava" task to be always part of a Gradle project?

wjwarren avatar Feb 20 '13 11:02 wjwarren

Hello,

indeed this is a piece of the problem, I've added this task dependency to make sure the git resolution would happen before the compilation phase and was not yet able to found a generic way to express that... but I ve quickly tried yesterday to just remove this dependency and call the resolution task in the project itself, i.e. for android plugin as a dependency to assemble... but still the call would not succeed properly... I think i m not familiar enough with this plugin, in your config if you call the

resolveGitDependencies

task, is it working ? could share a properly initialized android project so that I can look at it ?

bat-cha avatar Feb 20 '13 12:02 bat-cha

When I run gradle resolveGitDependencies on a build script with the Android plugin applied and configured, I get the following output:

Download http://repo1.maven.org/maven2/org/batcha/gradle/plugins/git-dependencies/0.1/git-dependenci es-0.1.pom Download http://repo1.maven.org/maven2/org/batcha/gradle/plugins/git-dependencies/0.1/git-dependenci es-0.1.jar

FAILURE: Build failed with an exception.

What went wrong: Could not resolve all dependencies for configuration ':compile'. Could not find group:org.batcha, module:dummy-project-a, version:4.2. Required by: com.tuenti:android-messenger-new-integration:1.0

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l og output.

BUILD FAILED

Total time: 5.162 secs

I'll try and set up a dummy Android project somewhere later today.

wjwarren avatar Feb 20 '13 15:02 wjwarren

Added a dummy Android project with Gradle here: https://github.com/wjwarren/dummy-android-gradle-project

wjwarren avatar Feb 20 '13 20:02 wjwarren

Hi Wijnand,

Thanks for the precision on your problem and the android project, I've removed the implicit dependency to a java plugin usage by using groovy afterEvaluate to execute the resolve git task ... I'll try with your project to see if it solves the issue with last version of the plugin (I've released the artifact to mavenCentral too, it take some times to get refreshed)

bat-cha avatar Feb 20 '13 21:02 bat-cha

Hi Wijnand !

my script failed with unknown target android-16 probably because I still have a wrong setup but I've checked that the dummy-java project was effectivelly installed on local maven (even if i remove it... before) could you please confirm ? (last version of plugin is also available on mavenCentral)

bat-cha avatar Feb 20 '13 22:02 bat-cha

Hi, apologies for that. I forgot that you'd have to install an actual android API package as well.

From your Android SDK install folder run:

  • SDK Manager.exe on Windows OR
  • go to [android-sdk-root]\tools on Linux/Mac and run android sdk

This will start the Android SDK Manager and from there you can install API 16.

wjwarren avatar Feb 21 '13 09:02 wjwarren

Hmm, just came across this little nugget on the Roadmap for the Android Gradle plugin:

Ability to manipulate tasks (per variant, per flavor, per build type, ...), ability to insert steps that impact input/output of default task

Might be an idea to wait on the 0.3 release of the plugin if this issue proves particularly difficult.

wjwarren avatar Feb 22 '13 15:02 wjwarren

Hello Wijnand,

I've correctly set-up the dummy android project and there is indeed an incompatibility. The plugin looks for the user defined dependencies configurations but if you put them under android namespace then it cannot access it "by default". I may find a way to fix this by specifying extra property for the plugin so that it can lookup for the configurations. I may be able to deliver this maybe before 0.3 release... I'll let you know

bat-cha avatar Feb 22 '13 15:02 bat-cha

Cool, thanks! :smile:

wjwarren avatar Feb 22 '13 15:02 wjwarren

Added a work around to a branch of my dummy project. Have a look at the readme here: https://github.com/wjwarren/dummy-android-gradle-project/tree/work-around

wjwarren avatar Feb 22 '13 22:02 wjwarren

Hi Wijnand,

I've fixed the issue by liooking for git defined dependencies in any configuration, cf 2af95f917f I've added few log if you activate info. It is still under 0.1, being redeployed to mavenCentral right now but you can test also with a latest built version (do not forget to use mavenLocal in your buildscript repositories then) Please check and tell me if it solve your issue, I'll then close this issue

Cheers bat

bat-cha avatar Feb 24 '13 15:02 bat-cha

I tried with my dummy project, using a local build of the latest plugin code, but I got the following error after running gradle build:

Starting Build Settings evaluated using settings file 'D:\Projects\Android\dummy-android-gradle-project\settings.gradle'. Projects loaded. Root project using build file 'D:\Projects\Android\dummy-android-gradle-project\build.gradle'. Included projects: [root project 'dummy-android-gradle-project'] Evaluating root project 'dummy-android-gradle-project' using build file 'D:\Projects\Android\dummy-android-gradle-project\build.gradle'. Task ':resolveGitDependencies' has not declared any outputs, assuming that it is out-of-date. Git dependency found for dummy-project-a 4.2 https://github.com/bat-cha/dummy-java-project-a.git

BUILD FAILED

Total time: 2.462 secs

Could not resolve all dependencies for configuration ':compile'. org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':compile'. at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52) at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:39) at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getResolvedArtifacts(DefaultResolvedConfiguration.java:62) at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.getResolvedArtifacts(SelfResolvingDependencyResolver.java:62) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getResolvedArtifacts(ErrorHandlingArtifactDependencyResolver.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3465) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at com.android.build.gradle.BasePlugin.collectArtifacts(BasePlugin.groovy:674) at com.android.build.gradle.BasePlugin$collectArtifacts.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at com.android.build.gradle.BasePlugin.resolveDependencyForConfig(BasePlugin.groovy:640) at com.android.build.gradle.BasePlugin$resolveDependencyForConfig.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153) at com.android.build.gradle.BasePlugin.resolveDependencies(BasePlugin.groovy:584) at com.android.build.gradle.BasePlugin$resolveDependencies.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at com.android.build.gradle.AppPlugin.createAndroidTasks(AppPlugin.groovy:116) at com.android.build.gradle.AppPlugin.this$3$createAndroidTasks(AppPlugin.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137) at com.android.build.gradle.AppPlugin$_apply_closure5.doCall(AppPlugin.groovy:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877) at groovy.lang.Closure.call(Closure.java:412) at org.gradle.listener.BroadcastDispatch$ClosureInvocationHandler.dispatch(BroadcastDispatch.java:116) at org.gradle.listener.BroadcastDispatch$ClosureInvocationHandler.dispatch(BroadcastDispatch.java:101) at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:88) at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:32) at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at sun.proxy.$Proxy9.afterEvaluate(Unknown Source) at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:47) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:463) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:75) at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23) at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21) at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38) at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35) at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:439) at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:434) at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38) at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39) at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30) at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:200) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:48) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.Main.main(Main.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) at org.gradle.launcher.GradleMain.main(GradleMain.java:26) Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionNotFoundException: Could not find group:org.batcha, module:dummy-project-a, version:4.2. Required by: nl.ansuz:dummy-android-gradle-project:0.1 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$StaticVersionResolveResult.notFound(LazyDependencyToModuleResolver.java:159) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$StaticVersionResolveResult.resolve(LazyDependencyToModuleResolver.java:118) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$ModuleVersionSelectorResolveState.resolve(DependencyGraphBuilder.java:933) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DefaultModuleRevisionResolveState.getDescriptor(DependencyGraphBuilder.java:653) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:331) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:307) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:122) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:58) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:68) at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:36) at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:34) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:133) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:125) at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:49) at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:34) at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:43) at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:41) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:37) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:236) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:57) at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.getProperty(BeanDynamicObject.java:146) at org.gradle.api.internal.BeanDynamicObject.getProperty(BeanDynamicObject.java:102) at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:78) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getProperty(Unknown Source) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47) ... 81 more

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':resolveGitDependencies'. org.eclipse.jgit.api.Git

Try: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

wjwarren avatar Feb 24 '13 19:02 wjwarren

Hi, looks like a timeout on git clone or fetch, could you try using this alternative url for the dummy project: git://github.com/bat-cha/dummy-java-project-a.git or use another project dependency/url if you have one ? (my output using your android dummy project with an empty mavenLocal:

Task ':resolveGitDependencies' has not declared any outputs, assuming that it is
 out-of-date.
Git dependency found for dummy-project-a 4.2 git://github.com/bat-cha/dummy-java
-project-a.git
Git dependency fetch from  git://github.com/bat-cha/dummy-java-project-a.git
Git dependency checkout 4.2 in B:\work\git\dummy-android-gradle-project\build\gi
t-dependencies\dummy-project-a
Git dependency install via gradle wrapper from  B:\work\git\dummy-android-gradle
-project\build\git-dependencies\dummy-project-a

Let me know iwhat it gives, Thanks Cheers bat

bat-cha avatar Feb 24 '13 22:02 bat-cha

Same happens with different Git urls:

... Task ':resolveGitDependencies' has not declared any outputs, assuming that it is out-of-date. Git dependency found for dota2-api-wrapper 0.1 https://github.com/wjwarren/dota2-api-wrapper.git Could not resolve all dependencies for configuration ':compile'. org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':compile'. at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52) ...

Are you using the same Gradle version as me? I'm on 1.2.

wjwarren avatar Feb 24 '13 23:02 wjwarren

Hi,

It seems like Google just released 0.3 of their Android Gradle plugin. I'll upgrade the dummy project to that and start using Gradle 1.4. I'll let you know if this error still happens then.

Wijnand

wjwarren avatar Feb 28 '13 11:02 wjwarren

Hi Wijnand, Yes I was using gradle 1.2 and wa snot able to reproduce the bug. I've upgraded to plugin 0.3 on my dummy android project and it's also working fine, please tell me if plugin 0.3 makes it easier for you or not, Thanks Cheers bat

bat-cha avatar Mar 01 '13 07:03 bat-cha

Hi,

Sorry for the very late reply, but I finally had some time to look into this again.

I've upgraded my dummy project to use version 0.3 of the Android Gradle plugin. After that I removed all folders from C:\Users\[username]\.gradle and from the root of my dummy project folder I removed both .gradle and build folders.

Things seem to work slightly better now but are still flaky.

Sometimes I need to build twice. Once to create the local Maven repository, but the build fails with Could not resolve all dependencies for configuration ':compile'.. Then the second time the build succeeds.

Other times I see the following output from your plugin when I use --info:

Compiling build file 'D:\Projects\Android\dummy-android-gradle-project\build.gradle' using BuildScriptTransformer. Resource missing. [HTTP GET: http://repo1.maven.org/maven2/nl/ansuz/dota2-api-wrapper/0.1/dota2-api-wrapper-0.1.pom] Resource missing. [HTTP HEAD: http://repo1.maven.org/maven2/nl/ansuz/dota2-api-wrapper/0.1/dota2-api-wrapper-0.1.jar] Task ':resolveGitDependencies' has not declared any outputs, assuming that it is out-of-date. Git dependency found for dota2-api-wrapper 0.1 https://github.com/wjwarren/dota2-api-wrapper.git Git dependency clone from https://github.com/wjwarren/dota2-api-wrapper.git Git dependency checkout 0.1 in D:\Projects\Android\dummy-android-gradle-project\build\git-dependencies\dota2-api-wrapper

Git dependency install via gradle wrapper from D:\Projects\Android\dummy-android-gradle-project\build\git-dependencies
dota2-api-wrapper Loading

And it will stay at loading forever.

Only one time the build managed to finish completely, but I think I've tried it a total of 20 times.

Sorry to be the bearer of bad news. :worried:

wjwarren avatar Mar 15 '13 22:03 wjwarren

Hi Wijnand, no worries, Iwas pretty busy too ;-)

seems that the dependency you're resolving is failing to install if it takes forever in the install step

could you try to run ./gradlew or gradlew.bat from D:\Projects\Android\dummy-android-gradle-project\build\git-dependencies\dota2-api-wrapper ?

what would be the output of this could help solve the install issue... (so far the plugin is waiting that install task finish to continue, if not it could indeed stall...)

bat-cha avatar Mar 15 '13 23:03 bat-cha

Super fast:

D:\Projects\Android\dummy-android-gradle-project\build\git-dependencies\dota2-api-wrapper>gradlew.bat install :compileJava :processResources UP-TO-DATE :classes :jar :install

BUILD SUCCESSFUL

Total time: 3.781 secs

wjwarren avatar Mar 16 '13 00:03 wjwarren

Has this issue been resolved, or is it still open?

caseykulm avatar May 23 '13 15:05 caseykulm

I haven't tried in a while, but I think the problem is still there.

If you want to try it out quickly, do a clone of my test project (https://github.com/wjwarren/dummy-android-gradle-project) and run gradle build (assuming you have your environment set up already).

wjwarren avatar May 24 '13 15:05 wjwarren

Hi, haven't tried either for a while, I'll give it a try with latest version 0.4.1 of the Android Gradle Plugin

bat-cha avatar May 24 '13 15:05 bat-cha

Hi , Im' not 100% sure I found the origin of the bug you experienced but it seems that adding mavenLocal() as a repo in the android section helped. I have a working build locally with this

https://github.com/bat-cha/dummy-android-gradle-project/commit/24d4417cf5fa361788152e231f65e61376793ae9

@wjwarren @why1991 please tell me if using latest android gradle plugin and gradle 1.6 you still experienced dependency resolution failure

bat-cha avatar May 25 '13 16:05 bat-cha

I tried with your modified version, but it's getting stuck on the following for me:

Task ':resolveGitDependencies' has not declared any outputs, assuming that it is out-of-date. Git dependency found for dota2-api-wrapper 0.2 https://github.com/bat-cha/dota2-api-wrapper.git Git dependency fetch from https://github.com/bat-cha/dota2-api-wrapper.git Git dependency checkout 0.2 in D:\Projects\dummy-android-gradle-project\build\git-dependencies\dota2-api-wrapper Git dependency install via gradle wrapper from D:\Projects\dummy-android-gradle-project\build\git-dependencies\dota2-api-wrapper

Edit: What I might try is installing a latest version of Maven and see if that helps.

wjwarren avatar May 27 '13 21:05 wjwarren

Same for me.

It stops after " Git dependency install via gradle wrapper from /Volumes/TCDev/magapp-android/build/git-dependencies/two-way-gridview " and loads forever.

mikebevz avatar Jul 11 '13 17:07 mikebevz

Hi I'm trying to use gradle-git-dependencies with an android-library (which builds into an AAR). When running "gradle build" (classpath 'com.android.tools.build:gradle:0.6.3') the git dependencies are resolved just find and build/git-dependencies contains the proper cloned dependency, but for some reason this dependency is never built, and so no build/libs is created, and the project build is failing on missing symbols. Anyone might have an insight on why is this and how I could fix the plugin code to work with the android-plugin?

Thanks, Alon

burgalon avatar Nov 20 '13 17:11 burgalon