FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Refresh tutorial by jasonjoh · Pull Request #9 · microsoftgraph/msgraph-training-java · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .bat  (1) .example  (3) .gradle  (2) .jar  (1) .java  (11) .md  (9) .png  (1) .prefs  (13) .properties  (1) .xml  (3) No extension  (1) dotfile  (12) All 12 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 1 addition & 9 deletions README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@ In this lab you will create a console application using the Microsoft Authentica

- [Java Microsoft Graph tutorial](https://docs.microsoft.com/graph/tutorials/java)

## Demos

The [demos](./demos) directory in this repository contains copies of the project that correspond to completing individual sections of the tutorial. If you just want to demo a particular section of the tutorial, you can start with the version from the previous section.

- [01-create-app](demos/01-create-app): Completed [Create a Java console app](https://docs.microsoft.com/graph/tutorials/java?tutorial-step=1)
- [02-add-aad-auth](demos/02-add-aad-auth): Completed [Add Azure AD authentication](https://docs.microsoft.com/graph/tutorials/java?tutorial-step=3)
- [03-add-msgraph](demos/03-add-msgraph): Completed [Get calendar data](https://docs.microsoft.com/graph/tutorials/java?tutorial-step=4)

## Completed sample

If you just want the completed sample generated by following this lab, you can find it here.

- [Completed project](demos/03-add-msgraph)
- [Completed project](demo)

## Disclaimer

Expand Down
5 changes: 2 additions & 3 deletions demos/03-add-msgraph/README.md → demo/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To run the completed project in this folder, you need the following:

- [Java SE Development Kit (JDK)](https://java.com/en/download/faq/develop.xml) and [Maven](https://maven.apache.org/) installed on your development machine. If you do not have the JDK or Maven, visit the previous links for download options. (**Note:** This tutorial was written with OpenJDK version 12.0.1 and Maven 3.6.1. The steps in this guide may work with other versions, but that has not been tested.)
- [Java SE Development Kit (JDK)](https://java.com/en/download/faq/develop.xml) and [Gradle](https://gradle.org/) installed on your development machine. If you do not have the JDK or Gradle, visit the previous links for download options. (**Note:** This tutorial was written with OpenJDK version 14.0.0.36 and Gradle 6.3. The steps in this guide may work with other versions, but that has not been tested.)
- A Microsoft work or school account.

If you don't have a Microsoft account, you can [sign up for the Office 365 Developer Program](https://developer.microsoft.com/office/dev-program) to get a free Office 365 subscription.
Expand Down Expand Up @@ -48,6 +48,5 @@ If you don't have a Microsoft account, you can [sign up for the Office 365 Devel
In your command-line interface (CLI), navigate to the project directory and run the following commands.

```Shell
mvn package
java -cp target/graphtutorial-1.0-SNAPSHOT.jar com.contoso.App
./gradlew --console plain run
```
6 changes: 6 additions & 0 deletions demo/graphtutorial/.gitattributes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

5 changes: 5 additions & 0 deletions demo/graphtutorial/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
17 changes: 17 additions & 0 deletions demo/graphtutorial/.project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>graphtutorial_</name>
<comment>Project graphtutorial_ created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1
45 changes: 45 additions & 0 deletions demo/graphtutorial/build.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.3/userguide/tutorial_java_projects.html
*/

plugins {
// Apply the java plugin to add support for Java
id 'java'

// Apply the application plugin to add support for building a CLI application.
id 'application'
}

repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

// <DependenciesSnippet>
dependencies {
// This dependency is used by the application.
implementation 'com.google.guava:guava:28.2-jre'

// Use JUnit test framework
testImplementation 'junit:junit:4.12'
implementation 'com.microsoft.azure:msal4j:1.4.0'
implementation 'com.microsoft.graph:microsoft-graph:1.6.0'
implementation 'org.slf4j:slf4j-nop:1.8.0-beta4'
}
// </DependenciesSnippet>

application {
// Define the main class for the application.
mainClassName = 'graphtutorial.App'
}

// <StandardInputSnippet>
run {
standardInput = System.in
}
// </StandardInputSnippet>
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
183 changes: 183 additions & 0 deletions demo/graphtutorial/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

Back | FazBrowse Home | New Git URL