diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..34b6bd3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.gradle +local.properties +.idea +.DS_Store +build +captures +testServerAddress.txt +app/app.iml +lib/lib.iml +javadoc \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index f6d4e11a..80d70c77 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.unity3d.ads.example" minSdkVersion 9 targetSdkVersion 23 - versionCode = 2004 - versionName = "2.0.4" + versionCode = 2005 + versionName = "2.0.5" } buildTypes { release { diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png deleted file mode 100644 index 51f13304..00000000 Binary files a/app/src/main/ic_launcher-web.png and /dev/null differ diff --git a/lib/build.gradle b/lib/build.gradle index cb351212..ab1bab90 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -12,8 +12,8 @@ android { defaultConfig { minSdkVersion 9 targetSdkVersion 23 - versionCode = 2004 - versionName = "2.0.4" + versionCode = 2005 + versionName = "2.0.5" setProperty("archivesBaseName", "unity-ads") @@ -85,9 +85,9 @@ android.libraryVariants.all { variant -> source = variant.javaCompile.source ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar) - options { - links "http://docs.oracle.com/javase/7/docs/api/" - linksOffline "http://developer.android.com/reference","${android.sdkDirectory}/docs/reference" + options { + links "http://docs.oracle.com/javase/7/docs/api/" + linksOffline "http://developer.android.com/reference","${android.sdkDirectory}/docs/reference" } exclude '**/R.java' destinationDir = file("../javadoc/") @@ -96,5 +96,10 @@ android.libraryVariants.all { variant -> def getPropertyStringWithDefaultValue(String key, String defaultValue) { def value = project.getProperties().get(key); + // Ensure that string is quoted + if ((value != null) && (!(value ==~ /^".*"$/)) ){ + println "Value for key '$key' is not quoted, adding quotes to '$value'"; + value = "\"$value\""; + } return value != null ? value : defaultValue; } diff --git a/lib/src/main/java/com/unity3d/ads/configuration/InitializeThread.java b/lib/src/main/java/com/unity3d/ads/configuration/InitializeThread.java index 4dd34168..26ea0ba5 100644 --- a/lib/src/main/java/com/unity3d/ads/configuration/InitializeThread.java +++ b/lib/src/main/java/com/unity3d/ads/configuration/InitializeThread.java @@ -391,8 +391,8 @@ public InitializeStateNetworkError(Exception exception, InitializeState erroredS public InitializeState execute() { DeviceLog.error("Unity Ads init: network error, waiting for connection events"); - ConnectivityMonitor.addListener(this); _conditionVariable = new ConditionVariable(); + ConnectivityMonitor.addListener(this); if (_conditionVariable.block(10000L * 60L)) { ConnectivityMonitor.removeListener(this); diff --git a/lib/src/main/java/com/unity3d/ads/properties/SdkProperties.java b/lib/src/main/java/com/unity3d/ads/properties/SdkProperties.java index a2c581c4..5c9344b6 100644 --- a/lib/src/main/java/com/unity3d/ads/properties/SdkProperties.java +++ b/lib/src/main/java/com/unity3d/ads/properties/SdkProperties.java @@ -76,7 +76,7 @@ public static String getConfigUrl() { } public static String getDefaultConfigUrl(String flavor) { - return "https://cdn.unityads.unity3d.com/webview/" + getWebViewBranch() + "/" + flavor + "/config.json"; + return "https://config.unityads.unity3d.com/webview/" + getWebViewBranch() + "/" + flavor + "/config.json"; } private static String getWebViewBranch() { diff --git a/print-changelog.sh b/print-changelog.sh index bf8d53e7..59b0a1d1 100755 --- a/print-changelog.sh +++ b/print-changelog.sh @@ -2,8 +2,15 @@ # Prints all merged github pull requests after last release tag -REPOURL=$(git info|awk -F= '/^remote.origin.url=/ {print $2}') -PREVTAG=$(git tag|sed -n '$p') +REPOURL=$(git config --get remote.origin.url) +if [[ $REPOURL != https* ]]; then + SSH_PREFIX="git@github.com:" + REPOURL=${REPOURL%.git} + REPOURL="https://github.com/${REPOURL#$SSH_PREFIX}" +fi + +CURRENT_TAG=$(git describe --abbrev=0 --tags) +PREVTAG=$(git describe --abbrev=0 --tags ${CURRENT_TAG}~1) COMMIT=$(git rev-parse $PREVTAG) git log $PREVTAG..HEAD --merges --grep "Merge pull request #" | grep "^ Merge pull request #" -A2 | grep -v "^--" | while read FOO1 FOO2 FOO3 PRNUMBER FOO5 PRBRANCH; do read FOO diff --git a/unity-ads-android.iml b/unity-ads-android.iml new file mode 100644 index 00000000..b6d38082 --- /dev/null +++ b/unity-ads-android.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file