Skip to content

Commit eea3103

Browse files
author
Caitlin Bales (MSFT)
authored
Merge pull request #59 from microsoftgraph/preview-release
Preview release
2 parents b109fd8 + ff3bc6b commit eea3103

File tree

7 files changed

+105
-24
lines changed

7 files changed

+105
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ hs_err_pid*
3232
# Maven
3333
/target/
3434
/pom.xml
35+
local.properties

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Contributing to the Microsoft Graph SDK for Java
23

34
The Microsoft Graph SDK is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK.
@@ -22,3 +23,24 @@ Revisions of this nature will result in a 0.X.X change of the version number.
2223

2324
## Submit pull requests for model or request files
2425
You can revise code in the extension folders of these folders. See [Extending the Library](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Extending-the-Library) for more information on how to work with the generated parts of the library.
26+
27+
## Add yourself as a contributor
28+
29+
This project follows the [all contributors](https://github.com/kentcdodds/all-contributors) specification. When making a contribution, please add yourself to the table of contributors:
30+
31+
1. In section 7. of the [README.md](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/README.md), after the last "|", copy and paste a new blank contributor element
32+
```html
33+
[<img src="https://avatars.githubusercontent.com/u/<your-uid>?v=4" width="100px;"/><br />
34+
<sub><b>Your Name</b></sub>](your website or github page)<br />
35+
[emoji](link "alt-text") |
36+
```
37+
38+
You can get your GitHub UID by inspecting your GitHub avatar image.
39+
40+
2. For each contribution type (see [emoji key](https://github.com/kentcdodds/all-contributors#emoji-key) for a list of contribution types), add an emoji and a relevant link and alt-text.
41+
42+
For example, if you write a blogpost on how to use the SDK, you would include:
43+
44+
```html
45+
[📝]("https://myblog.com/using-the-java-sdk" "Blog Post")
46+
```

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
# Preview Microsoft Graph SDK for Java
2-
3-
This client library is currently in private preview status. This means that:
4-
- The API surface may change significantly.
5-
- Non-blocking issues *may* be triaged at a slower pace.
6-
- You may submit feedback through issues or PRs. You will have a better chance of your changes being implemented if they are submitted before public preview release.
7-
- We do not define an SLA or support strategy for this library.
8-
9-
We welcome your feedback as we drive the quality of this to general availability.
2+
*This SDK is currently in preview. Please continue to provide [feedback](https://github.com/microsoftgraph/msgraph-sdk-java/issues/new) as we iterate towards a production-supported library.*
103

114
Get started with the Microsoft Graph SDK for Java by integrating the [Microsoft Graph API](https://graph.microsoft.io/en-us/getting-started) into your Java application!
125

136
## 1. Installation
147

158
### 1.1 Install via Gradle
16-
17-
> [!NOTE]
18-
> This package will not be available via Gradle until it is in public preview. You need to download the source and reference the package locally.
19-
209
Add the JCenter repository and a compile dependency for `microsoft-graph` to your project's `build.gradle`:
2110

2211
```gradle
@@ -26,7 +15,7 @@ repository {
2615
2716
dependency {
2817
// Include the sdk as a dependency
29-
compile('com.microsoft.graph:msgraph-sdk-java:1.0.+')
18+
compile('com.microsoft.graph:microsoft-graph:0.1.+')
3019
}
3120
```
3221

@@ -46,9 +35,6 @@ An instance of the **GraphServiceClient** class handles building requests, sendi
4635
For an example of authentication in a client application, see the [MSGraph SDK Android MSA Auth for Android Adapter](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter).
4736

4837
### 2.3 Get a GraphServiceClient object
49-
50-
<!--TODO: the following para needs expansion or removal. Would need to mention the different flows (authorization code flow, implicit flow, client credential flow) and give pointers on where to get sample code. Dave Moten can provide link for client credentials flow.-->
51-
5238
After you have set the correct application ID and URL, you must get a **GraphServiceClient** object to make requests against the service. The SDK stores the account information for you, but when a user signs in for the first time, it invokes the UI to get the user's account information.
5339

5440
```java
@@ -106,6 +92,17 @@ For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-sdk-jav
10692

10793
The Microsoft Graph SDK is open for contribution. To contribute to this project, see [Contributing](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/CONTRIBUTING.md).
10894

95+
Thanks to everyone who has already devoted time to improving the library:
96+
97+
<!-- ALL-CONTRIBUTORS-LIST:START -->
98+
<!-- prettier-ignore -->
99+
| [<img src="https://avatars.githubusercontent.com/u/2273297?v=4" width="100px;"/><br /><sub><b>Caitlin Bales</b></sub>](https://developer.microsoft.com/graph)<br />[💬](#question-cbales "Answering Questions") [💻](https://github.com/microsoftgraph/msgraph-sdk-java/commits?author=cbales "Code") [📖](https://github.com/microsoftgraph/msgraph-sdk-java/wiki "Documentation") [👀](#review-cbales "Reviewed Pull Requests") [⚠️](https://github.com/microsoftgraph/msgraph-sdk-java/commits?author=cbales "Tests")| [<img src="https://avatars.githubusercontent.com/u/318187?v=4" width="100px;"/><br /><sub><b>David Moten</b></sub>](https://github.com/davidmoten)<br /> [🐛](https://github.com/microsoftgraph/msgraph-sdk-java/issues?q=is%3Aissue+author%3Adavidmoten "Bug reports") [💻](https://github.com/microsoftgraph/msgraph-sdk-java/commits?author=davidmoten "Code") [📖](https://github.com/microsoftgraph/msgraph-sdk-java/commit/87389b5a4240072e3f2226a2f04f089916ffed0b#diff-04c6e90faac2675aa89e2176d2eec7d8 "Documentation") [🤔](#ideas-davidmoten "Ideas & Planning") [👀](#review-davidmoten "Reviewed Pull Requests") [⚠️](https://github.com/microsoftgraph/msgraph-sdk-java/commits?author=davidmoten "Tests") | [<img src="https://avatars.githubusercontent.com/u/8527305?v=4" width="100px;"/><br /><sub><b>Michael Mainer</b></sub>](https://developer.microsoft.com/graph)<br /> [💬](#question-cbales "Answering Questions") [🤔](#ideas-MIchaelMainer "Ideas & Planning") [👀](#review-MIchaelMainer "Reviewed Pull Requests") | [<img src="https://avatars.githubusercontent.com/u/27295799?v=4" width="100px;"/><br /><sub><b>Linda Caputo</b></sub>](https://developer.microsoft.com/graph)<br />[📖](https://github.com/microsoftgraph/msgraph-sdk-java/wiki "Documentation") | [<img src="https://avatars.githubusercontent.com/u/8884923?v=4" width="100px;"/><br /><sub><b>John Austin</b></sub>](https://developer.microsoft.com/graph)<br />[🐛](https://github.com/microsoftgraph/msgraph-sdk-java/issues "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/3460953?v=4" width="100px;"/><br /><sub><b>Dmitry Pimenov</b></sub>](https://developer.microsoft.com/graph)<br />[🤔](#ideas-dpim "Ideas & Planning") | [<img src="https://avatars.githubusercontent.com/u/1427840?v=4" width="100px;"/><br /><sub><b>Jonathan Giles</b></sub>](https://github.com/JonathanGiles)<br />[🤔](#ideas-JonathanGiles "Ideas & Planning") |
100+
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
101+
| [<img src="https://avatars.githubusercontent.com/u/881767?v=4" width="100px;"/><br /><sub><b>Martin Sawicki</b></sub>](https://github.com/martinsawicki)<br />[🤔](#ideas-martinsawicki "Ideas & Planning") | [<img src="https://avatars.githubusercontent.com/u/29152134?v=4" width="100px;"/><br /><sub><b>Louis Maresca</b></sub>](https://github.com/LouMM)<br />[🤔](#ideas-LouMM "Ideas & Planning") [👀](#review-LouMM "Reviewed Pull Requests") |
102+
<!-- ALL-CONTRIBUTORS-LIST:END -->
103+
104+
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
105+
109106
## 7. Supported Java versions
110107
The Microsoft Graph SDK for Java library is supported at runtime for Java 7+ and [Android API revision 15](http://source.android.com/source/build-numbers.html) and greater.
111108

build.gradle

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
apply plugin: 'java-library'
1111
apply plugin: 'java'
1212
apply plugin: 'eclipse'
13+
apply plugin: 'maven'
1314
apply plugin: 'maven-publish'
1415

1516
// In this section you declare where to find the dependencies of your project
@@ -38,7 +39,7 @@ publishing {
3839
publications {
3940
maven(MavenPublication) {
4041
groupId 'com.microsoft.graph'
41-
artifactId 'msgraph-sdk-java'
42+
artifactId 'microsoft-graph'
4243
version '0.1-SNAPSHOT'
4344

4445
from components.java
@@ -53,3 +54,61 @@ task sourceJar(type: Jar) {
5354
from sourceSets.main.allJava
5455
}
5556

57+
def getVersionCode() {
58+
return mavenMajorVersion.toInteger() * 10000 + mavenMinorVersion.toInteger() * 100 + mavenPatchVersion.toInteger()
59+
}
60+
61+
def getVersionName() {
62+
return "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}"
63+
}
64+
65+
uploadArchives {
66+
67+
def bintrayUsername = ""
68+
69+
def bintrayApikey = ""
70+
71+
if (project.rootProject.file('local.properties').exists()) {
72+
73+
Properties properties = new Properties()
74+
75+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
76+
77+
bintrayUsername = properties.getProperty('bintray.user')
78+
79+
bintrayApikey = properties.getProperty('bintray.apikey')
80+
81+
}
82+
83+
configuration = configurations.archives
84+
85+
repositories.mavenDeployer {
86+
87+
pom {
88+
89+
setGroupId project.mavenGroupId
90+
91+
setArtifactId project.mavenArtifactId
92+
93+
setVersion getVersionName()
94+
95+
}
96+
97+
repository (url: project.mavenRepoUrl) {
98+
99+
authentication(
100+
101+
// put these values in local file ~/.gradle/gradle.properties
102+
103+
userName: project.hasProperty("bintrayUsername") ? project.bintrayUsername : bintrayUsername,
104+
105+
password: project.hasProperty("bintrayApikey") ? project.bintrayApikey : bintrayApikey
106+
107+
)
108+
109+
}
110+
111+
}
112+
113+
}
114+

gradle.properties

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Project-wide Gradle settings.
22

3-
# IDE (e.g. Android Studio) users:
3+
# IDE users:
44
# Settings specified in this file will override any Gradle settings
55
# configured through the IDE.
66

@@ -16,13 +16,15 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19+
20+
# The size of the library demands a large amount of RAM to build. Increase as necessary if you get GC errors
1921
org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx4g
2022

21-
mavenRepoUrl = https://api.bintray.com/maven/microsoftgraph/Maven/msgraph-sdk-android
23+
mavenRepoUrl = https://api.bintray.com/maven/microsoftgraph/Maven/microsoft-graph
2224
mavenGroupId = com.microsoft.graph
23-
mavenArtifactId = msgraph-sdk-android
24-
mavenMajorVersion = 1
25-
mavenMinorVersion = 4
25+
mavenArtifactId = microsoft-graph
26+
mavenMajorVersion = 0
27+
mavenMinorVersion = 1
2628
mavenPatchVersion = 0
2729
nightliesUrl = http://dl.bintray.com/MicrosoftGraph/Maven
2830

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip

src/test/java/com/microsoft/graph/functional/PlannerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.Calendar;
3737
import java.util.UUID;
3838

39-
//@Ignore
39+
@Ignore
4040
public class PlannerTests {
4141
private static TestBase testBase;
4242
// For now, you must specify a specific plan ID since the test cannot

0 commit comments

Comments
 (0)