Skip to content

Commit a0aec0c

Browse files
authored
Release/0.1.2 (#271)
* Telemetry Events now tracked in a single Map + tests (#186) * Closes #52 * Updates dependencies from #189 These changes should be tested in conjunction with #52 #188 * Update buildTools to 25.0.3 * Updating sibling projects * Init vsts-ci build * track the log string buffer size and re-assign the stringbuffer if it exceeds the max limit * address comments * update unit test to make sure network connection is mocked and even if device is in airplane mode, unit test will still run fine. Unit test should not depend on physical device or emulator network. * adding emulator to run android test and enable gradle cache for travis CI add sudo:true * Closes #204 * make sure we have no args constructor to prevent usage of unsafe * remove finals from serializable fields * Coverage file is now found via wildcard * use versions.gradle to aggregate versions across subprojects * Fixed dead link in README * Closes #214 * Restart CI * Closes #221 * Restart CI * Closes #212 / VSTS-265161 * Closes #216 (Makes get/set property methods `final`) * Closes #219 * Changed string in README * CR feedback re Log TAG * update agp to 2.3.3 * update gradle to 4.1 * Closes #229 * Marking log messages that have PII as such (#235) * Marking log messages that have PII as such * Taking in code review comments * Adding logging when querying for CustomTab support * fixing broken link * Check that mCustomTabsServiceConnection is != null prior to querying connection state * reverting back to Chrome * Add API for user to configure the connect timeout and read timeout (#248) Create a new MsalSettings class for end-user to access the parameter settings for MSAL auth request and add API for user to configure the connect timeout and read timeout. * Update the version number for pre-release 0.1.2 as well as the changelog. (#250) * Update the changelog for #239 fix. (#256) * Revert the change on timeout APIs (#264) Revert the PR#248 and update the changelog. * Fix the build of test apps by disabling the testCoverageEnabled property. (#265) * Add RC build support (#255) * Add RC build support. (cherry picked from commit 92ca066) * Add publishNonDefault to true in build.gradle to build all non default builds( release build ) (#269) (cherry picked from commit 6fe0eae) * Change Log edits (#272)
1 parent ce3a4a7 commit a0aec0c

File tree

79 files changed

+1158
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1158
-623
lines changed

.travis.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,55 @@
11
# ./travis.yml for MSAL android
22

33
language: android
4+
dist: precise
45

56
jdk:
67
- oraclejdk8
78

9+
# Don't use the Travis Container-Based Infrastructure
10+
sudo: true
11+
812
android:
913
components:
1014
# Travis has a bug that we need to workaround to use sdk 25
1115
# https://github.com/travis-ci/travis-ci/issues/6059
1216
- tools
1317
- tools
1418
- platform-tools
15-
- build-tools-25.0.2
19+
- build-tools-25.0.3
1620
- android-25
1721
- extra
1822
- extra-android-m2repository
1923
- extra-google-m2repository
24+
- addon-google_apis-google-21
25+
#system images
26+
- sys-img-armeabi-v7a-addon-google_apis-google-21
2027

2128
env:
29+
global:
30+
# This is to guaratee a clean gradle log
31+
- TERM=dumb
2232
matrix:
2333
- ANDROID_SDKS=android-25 ANDROID_TARGET=android-25
2434

2535
before_install:
2636
- chmod +x gradlew
2737

38+
before_cache:
39+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
40+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
41+
cache:
42+
directories:
43+
- $HOME/.gradle/caches/
44+
- $HOME/.gradle/wrapper/
45+
- $HOME/.android/build-cache
46+
47+
before_script:
48+
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
49+
- emulator -avd test -no-audio -no-window &
50+
- android-wait-for-emulator
51+
- adb shell input keyevent 82 &
52+
2853
script:
2954
- cd $PWD
30-
- ./gradlew clean build --info
55+
- ./gradlew clean assembleRelease connectedAndroidTest -PdisablePreDex

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Microsoft Authentication Library (MSAL) Preview for Android
22
==============================================
33

4-
| [Getting Started](https://docs.microsoft.com/en-us/azure/active-directory/develop/guidedsetups/active-directory-mobileanddesktopapp-android-intro) | [Sample Code](https://github.com/Azure-Samples/active-directory-android-native-v2) | [API Reference](http://javadoc.io/doc/com.microsoft.identity.client/msal) | [Support](README.md#community-help-and-support)
4+
| [Getting Started](https://docs.microsoft.com/en-us/azure/active-directory/develop/guidedsetups/active-directory-mobileanddesktopapp-android-intro) | [Sample Code](https://github.com/Azure-Samples/active-directory-android-native-v2) | [Library Reference](http://javadoc.io/doc/com.microsoft.identity.client/msal) | [Support](README.md#community-help-and-support)
55
| --- | --- | --- | --- |
66

77
The MSAL library for Android gives your app the ability to begin using the [Microsoft Cloud](https://cloud.microsoft.com) by supporting [Microsoft Azure Active Directory](https://azure.microsoft.com/en-us/services/active-directory/) and [Microsoft Accounts](https://account.microsoft.com) in a converged experience using industry standard OAuth2 and OpenID Connect. The library also supports [Azure AD B2C](https://azure.microsoft.com/services/active-directory-b2c/).
@@ -43,7 +43,7 @@ Add to your app's Build.Gradle:
4343
mavenCentral()
4444
}
4545
dependencies {
46-
compile('com.microsoft.identity.client:msal:0.1.1') {
46+
compile('com.microsoft.identity.client:msal:0.1.2') {
4747
// if your app includes android support
4848
// libraries or GSON in its dependencies
4949
// uncomment below
@@ -67,7 +67,7 @@ To provide a recommendation, visit our [User Voice page](https://feedback.azure.
6767

6868
## Contribute
6969

70-
We enthusiastically welcome contributions and feedback. You can clone the repo and start contributing now. Read our [Contribution Guide](Contributing.md) for more information.
70+
We enthusiastically welcome contributions and feedback. You can clone the repo and start contributing now.
7171

7272
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
7373

@@ -176,6 +176,6 @@ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MI
176176

177177
### Step 4: Use the token!
178178

179-
The access token can now be used in an [HTTP Bearer request](https://github.com/Azure-Samples/active-directory-android-native-v2/blob/master/app/src/main/java/com/danieldobalian/msalandroidapp/MainActivity.java#L152).
179+
The access token can now be used in an [HTTP Bearer request](https://github.com/Azure-Samples/active-directory-android-native-v2/blob/56b8cca297adf616946e9ac2200847b71fd7578a/app/src/main/java/com/azuresamples/msalandroidapp/MainActivity.java#L152).
180180

181181

build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31
buildscript {
2+
apply from: rootProject.file("gradle/versions.gradle")
3+
44
repositories {
55
jcenter()
66
}
7+
78
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
9-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
9+
classpath "com.android.tools.build:gradle:$rootProject.ext.gradleVersion"
10+
classpath "com.github.dcendents:android-maven-gradle-plugin:$rootProject.ext.androidMavenGradlePluginVersion"
1211
}
1312
}
1413

changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
MSAL Wiki : https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki
2+
3+
Version 0.1.2
4+
----------------------------
5+
1. GDPR compliance to Telemetry and Logger. Link: https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki/Logging
6+
2. Fix the bug on CustomTabService checking when calling getCustomTabsServiceIsBound()
7+
3. Update Telemetry to track telemetry Event data in a single Map instance
8+
4. Specifies thrown Exception classes in AbstractMetadataRequestor
9+
5. Create "no-args" constructor for GSON POJOs to prevent using "sun.misc.Unsafe" 
10+
6. Specifies the default locale to UTF_8 to guarantee consistent behavior across all Android devices.
11+
7. Use versions.gradle to aggregate versions across subproject
12+
8. Update Gradle to 4.1
13+
9. Update Gson to 2.8.0
14+
15+
Version 0.1.1
16+
----------------------------
17+
* This release contains the preview for Microsoft Authentication library (MSAL) for Android.
18+
Re-tag to fix the dependencies pulling issue from jcenter.
19+
120
Version 0.1.0
221
----------------------------
322
* Initial preview release for MSAL

gradle/versions.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Variables for entire project
2+
ext {
3+
// SDK
4+
minSdkVersion = 21
5+
targetSdkVersion = 25
6+
compileSdkVersion = 25
7+
buildToolsVersion = "25.0.3"
8+
9+
// Plugins
10+
gradleVersion = "2.3.3"
11+
androidMavenGradlePluginVersion = "1.4.1"
12+
13+
// Libraries
14+
supportLibraryVersion = "25.3.1"
15+
junitVersion = "4.12"
16+
mockitoCoreVersion = "1.10.19"
17+
dexmakerMockitoVersion = "1.2"
18+
runnerVersion = "0.5"
19+
rulesVersion = "0.5"
20+
gsonVersion = "2.8.1"
21+
}

gradle/wrapper/gradle-wrapper.jar

1.05 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sun Jan 22 18:03:19 PST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

gradlew

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,43 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
##############################################################################
44
##
55
## Gradle start up script for UN*X
66
##
77
##############################################################################
88

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
1126

1227
APP_NAME="Gradle"
1328
APP_BASE_NAME=`basename "$0"`
1429

30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
1533
# Use the maximum available, or set MAX_FD != -1 to use that value.
1634
MAX_FD="maximum"
1735

18-
warn ( ) {
36+
warn () {
1937
echo "$*"
2038
}
2139

22-
die ( ) {
40+
die () {
2341
echo
2442
echo "$*"
2543
echo
@@ -30,6 +48,7 @@ die ( ) {
3048
cygwin=false
3149
msys=false
3250
darwin=false
51+
nonstop=false
3352
case "`uname`" in
3453
CYGWIN* )
3554
cygwin=true
@@ -40,26 +59,11 @@ case "`uname`" in
4059
MINGW* )
4160
msys=true
4261
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
4365
esac
4466

45-
# Attempt to set APP_HOME
46-
# Resolve links: $0 may be a link
47-
PRG="$0"
48-
# Need this for relative symlinks.
49-
while [ -h "$PRG" ] ; do
50-
ls=`ls -ld "$PRG"`
51-
link=`expr "$ls" : '.*-> \(.*\)$'`
52-
if expr "$link" : '/.*' > /dev/null; then
53-
PRG="$link"
54-
else
55-
PRG=`dirname "$PRG"`"/$link"
56-
fi
57-
done
58-
SAVED="`pwd`"
59-
cd "`dirname \"$PRG\"`/" >/dev/null
60-
APP_HOME="`pwd -P`"
61-
cd "$SAVED" >/dev/null
62-
6367
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6468

6569
# Determine the Java command to use to start the JVM.
@@ -85,7 +89,7 @@ location of your Java installation."
8589
fi
8690

8791
# Increase the maximum file descriptors if we can.
88-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
8993
MAX_FD_LIMIT=`ulimit -H -n`
9094
if [ $? -eq 0 ] ; then
9195
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +154,19 @@ if $cygwin ; then
150154
esac
151155
fi
152156

153-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154-
function splitJvmOpts() {
155-
JVM_OPTS=("$@")
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
156161
}
157-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
159171

160-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)