Hello,
I am trying to use Artifactory with Android multi project.
A project structure is like below.
-------------------------------------------------------------
Top Project
|-app: Android app project
|-common-lib: Java library project
-------------------------------------------------------------
And I want to build it with dependencies like below.
---------------------------------------------------------
Dependencies:
* app -> common-lib
* common-lib -> artifactory repository (the name is GradleDemo)
----------------------------------------------------------
But this not works directly. The error messages become below.
------------------------------------------------------------------------------
$ ./gradlew build
... omit some downloading ...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not resolve miubiq.gradle.demo:GradleDemo:0.0.0.
Required by:
AndroidWithArtifactoyExample:app:unspecified >
AndroidWithArtifactoyExample:common-lib:unspecified
> Could not HEAD
> ‘{THIS_IS_OUR_ARTIFACTORY_URL}/repo/miubiq/gradle/demo/GradleDemo/0.0.0/GradleDemo-0.0.0.pom'.
> Received status code 401 from server: Unauthorized
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
BUILD FAILED
------------------------------------------------------------------------------
I struggled some, then I found a silly solution.
After the Artifactory repository is cached in a local machine, the build
becomes success even without Artifactory authentication.
So, when the repository is not cached, I need to build it like below.
--------------------------------------
$ edit app/build.gradle
# comment out below line
// compile project(':common-lib')
$ ./gradlew :common-lib:build
$ edit app/build.gradle
# comment in below line
compile project(':common-lib')
$ ./gradlew build
...
BUILD SUCCESSFUL
--------------------------------------
But this is not beautiful, and difficult for our team to explain these
complex steps.
So I was wondering if you could tell me better solutions.
Gradle version: 2.1.
Android tool version: 0.14.2
# I tried similar project structures, then get a similar error.
My whole code is my github repository.
https://github.com/RyomaKawajiri/AndroidWithArtifactoyExample
The version when I post this message:
https://github.com/RyomaKawajiri/AndroidWithArtifactoyExample/tree/f80507c57fb256ada492b3f7269137a8843898ec
Thank you,
Ryoma Kawajiri
--
View this message in context:
http://forums.jfrog.org/Artifactory-with-Android-multi-project-tp7580115.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users