OfficeDev / Office-365-SDK-for-Android

Microsoft Services SDKs for Android produced by MS Open Tech.
https://dev.office.com/android
Other
224 stars 74 forks source link

Sample build depends on SDK build; SDK build depends on global props #94

Closed FabianFrank closed 9 years ago

FabianFrank commented 9 years ago
ffrank@ffrank-ltm:~/git/Office-365-SDK-for-Android/samples/outlook (1) $ ~/gradle-2.2.1/bin/gradle assembleDebug

FAILURE: Build failed with an exception.

* Where:
Script '/Users/ffrank/git/Office-365-SDK-for-Android/sdk/library.gradle' line: 47

* What went wrong:
A problem occurred evaluating script.
> Could not find property 'bintrayUsername' on project ':outlook-services'.

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

BUILD FAILED

Total time: 0.94 secs
marcote commented 9 years ago

https://github.com/OfficeDev/Office-365-SDK-for-Android/blob/master/sdk/library.gradle#L48

joshgav commented 9 years ago

We should check for these props before using them, or only use them when the uploadArchives task is invoked.

But why do we have to compile the SDK within the sample? We should adjust the build script in those.

marcote commented 9 years ago

We can supply dummy props, and they will get override if the prop is defined in ~/.gradle/gradle.properties . This will stop the evaluation error.

joshgav commented 9 years ago

Okay, that's a good stopgap, thanks @marcote. Can we remove the dependency on building the SDKs from the samples too?

FabianFrank commented 9 years ago

My recommendation would be to make the samples as close to what real world code would look like. Why not pull in the dependencies from jcenter?

marcote commented 9 years ago

We can and we should. :+1:

marcote commented 9 years ago

The samples and E2E now uses the artifacts deployed in bintray/jcenter. Also I fixed the mentioned evaluation error. If you still face issues, please re-open the issue.