Skip to content

Commit

Permalink
Merge pull request #937 from AzureAD/release/1.12.1
Browse files Browse the repository at this point in the history
release merge for 1.13.0
  • Loading branch information
nazukj authored Aug 10, 2017
2 parents 4a9261f + 9d0475d commit 3f783e3
Show file tree
Hide file tree
Showing 80 changed files with 2,541 additions and 750 deletions.
27 changes: 26 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# ./travis.yml for adal android

language: android
dist: precise

jdk:
- oraclejdk8

# Don't use the Travis Container-Based Infrastructure
sudo: true

android:
components:
# Travis has a bug that we need to workaround to use sdk 25
Expand All @@ -17,14 +21,35 @@ android:
- extra
- extra-android-m2repository
- extra-google-m2repository
- addon-google_apis-google-21
#system images
- sys-img-armeabi-v7a-addon-google_apis-google-21

env:
global:
# This is to guaratee a clean gradle log
- TERM=dumb
matrix:
- ANDROID_SDKS=android-25 ANDROID_TARGET=android-25

before_install:
- chmod +x gradlew

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache

before_script:
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &

script:
- cd $PWD
- ./gradlew clean build --info
- ./gradlew clean build connectedAndroidTest -PdisablePreDex
196 changes: 106 additions & 90 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We have adopted the semantic versioning flow that is industry standard for OSS projects. It gives the maximum amount of control on what risk you take with what versions. If you know how semantic versioning works with node.js, java, and ruby none of this will be new.

##Semantic Versioning and API stability promises
## Semantic Versioning and API stability promises

Microsoft Identity libraries are independent open source libraries that are used by partners both internal and external to Microsoft. As with the rest of Microsoft, we have moved to a rapid iteration model where bugs are fixed daily and new versions are produced as required. To communicate these frequent changes to external partners and customers, we use semantic versioning for all our public Microsoft Identity SDK libraries. This follows the practices of other open source libraries on the internet. This allows us to support our downstream partners which will lock on certain versions for stability purposes, as well as providing for the distribution over NuGet, CocoaPods, and Maven.

Expand Down
45 changes: 41 additions & 4 deletions adal/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
// Add JaCoCo for coverage metrics
apply plugin: 'jacoco'
// This plugin publishes adal in to the local maven repo
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'findbugs'
Expand All @@ -8,6 +10,10 @@ apply plugin: 'maven-publish'

group = 'com.microsoft.aad'

configurations {
javadocDeps
}

buildscript {
repositories {
jcenter()
Expand All @@ -25,12 +31,15 @@ android {
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.12.0"
versionName "1.13.0"
project.archivesBaseName = "adal"
project.version = android.defaultConfig.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
testCoverageEnabled true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt')
Expand All @@ -42,6 +51,8 @@ android {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java', 'src/main/aidl']
}

androidTest.setRoot('src/androidTest')
}

sourceSets {
Expand Down Expand Up @@ -78,7 +89,9 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//Compile Dependencies
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.android.support:support-annotations:25.0.0'
compile 'com.android.support:support-v4:25.0.0'

//Android Instrumental Test Dependencies
androidTestCompile 'com.android.support.test:runner:0.5'
Expand All @@ -90,8 +103,31 @@ dependencies {

// Test Dependencies
testCompile 'junit:junit:4.12'

// Javadoc Dependencies
javadocDeps 'com.android.support:support-annotations:25.0.0'
javadocDeps 'com.android.support:support-v4:25.0.0'
}

task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') {
reports {
xml.enabled = true
html.enabled = true
}

jacocoClasspath = configurations['androidJacocoAnt']

def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter)
def mainSrc = "${project.projectDir}/src/main/java"

sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: "$buildDir", includes: [
"jacoco/testDebugUnitTest.exec",
"outputs/code-coverage/connected/*coverage.ec"
])
}

task createPom {
pom {
Expand Down Expand Up @@ -139,6 +175,9 @@ task sourcesJar(type: Jar) {

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += configurations.compile
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.javadocDeps
exclude '**/*.aidl'
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
Expand All @@ -147,9 +186,7 @@ task javadoc(type: Javadoc) {
}
}
}
classpath = configurations.compile
destinationDir = reporting.file("$project.buildDir/outputs/jar/javadoc/")
failOnError = false
}

task javadocJar(type: Jar, dependsOn: javadoc) {
Expand Down
2 changes: 1 addition & 1 deletion adal/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
4 changes: 0 additions & 4 deletions adal/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<instrumentation
android:name="com.zutubi.android.junitreport.JUnitReportTestRunner"
android:targetPackage="com.microsoft.aad.adal.testapp" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@

package com.microsoft.aad.adal;

import java.util.Locale;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.os.Build;
import android.test.InstrumentationTestCase;
import android.util.Log;

import java.util.Locale;

public class ADALErrorTest extends InstrumentationTestCase {

private static final String TAG = "ADALErrorTests";
Expand All @@ -45,10 +43,6 @@ protected void setUp() throws Exception {
getInstrumentation().getTargetContext().getCacheDir();
System.setProperty("dexmaker.dexcache", getInstrumentation().getTargetContext().getCacheDir().getPath());

// ADAL is set to this signature for now
PackageInfo info = getInstrumentation().getContext().getPackageManager()
.getPackageInfo("com.microsoft.aad.adal.testapp", PackageManager.GET_SIGNATURES);

AuthenticationSettings.INSTANCE
.setBrokerPackageName(AuthenticationConstants.Broker.COMPANY_PORTAL_APP_PACKAGE_NAME);
Log.d(TAG, "mTestSignature is set");
Expand Down
Loading

0 comments on commit 3f783e3

Please sign in to comment.