diff --git a/build.gradle b/build.gradle index 7ab03725..c84d3c74 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript dependencies { - classpath "com.android.tools.build:gradle:2.3.3" + classpath "com.android.tools.build:gradle:3.0.0" classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3" } } @@ -18,10 +18,7 @@ allprojects repositories { jcenter() - maven - { - url "https://maven.google.com" - } + google() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1bce4111..0f504fef 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Mar 21 10:12:43 CET 2017 +#Thu Nov 16 15:09:27 CET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/library/build.gradle b/library/build.gradle index 7ce54bfa..08cae5bf 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -5,21 +5,21 @@ apply plugin: "maven-publish" ext { - appCompatVersion="25.4.0" + appCompatVersion="27.0.1" } android { - compileSdkVersion 25 - buildToolsVersion "25.0.3" + compileSdkVersion 26 + buildToolsVersion "26.0.2" defaultConfig { - minSdkVersion 9 - targetSdkVersion 25 + minSdkVersion 14 + targetSdkVersion 26 - versionCode 20 - versionName "2.5.3" + versionCode 21 + versionName "2.5.4" } buildTypes @@ -36,11 +36,11 @@ android dependencies { //Android - compile("com.android.support:appcompat-v7:$appCompatVersion") - compile("com.android.support:preference-v7:$appCompatVersion") + implementation("com.android.support:appcompat-v7:$appCompatVersion") + implementation("com.android.support:preference-v7:$appCompatVersion") - testCompile("junit:junit:4.0") - testCompile("org.json:json:20090211") + testImplementation("junit:junit:4.0") + testImplementation("org.json:json:20090211") } task sourcesJar(type: Jar) { @@ -139,7 +139,7 @@ bintray repo = "maven" name = "droid4me" userOrg = "smartnsoft" - licenses = ["LGPL-2.1"] + licenses = ["MIT"] vcsUrl = "https://github.com/smartnsoft/droid4me.git" publish = true diff --git a/library/src/main/java/com/smartnsoft/droid4me/AndroidLifeCycle.java b/library/src/main/java/com/smartnsoft/droid4me/AndroidLifeCycle.java index d937abc3..d55d8a2a 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/AndroidLifeCycle.java +++ b/library/src/main/java/com/smartnsoft/droid4me/AndroidLifeCycle.java @@ -28,6 +28,7 @@ * @author Édouard Mercier * @since 2012.06.21 */ +@Deprecated public interface AndroidLifeCycle { diff --git a/library/src/main/java/com/smartnsoft/droid4me/app/ActivityController.java b/library/src/main/java/com/smartnsoft/droid4me/app/ActivityController.java index 0fee6a2f..f8211225 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/app/ActivityController.java +++ b/library/src/main/java/com/smartnsoft/droid4me/app/ActivityController.java @@ -155,6 +155,7 @@ public interface SystemServiceProvider * @return the desired service, or {@code null} if no service corresponding to the provided {@code name} is available nor exists * @see Activity#getSystemService(String) */ + @Deprecated Object getSystemService(Activity activity, String name, Object defaultService); } @@ -660,6 +661,7 @@ public void registerInterceptor(ActivityController.Interceptor interceptor) * @return the service or {@code null} if the name does not exist * @see #registerSystemServiceProvider(ActivityController.SystemServiceProvider) */ + @Deprecated public Object getSystemService(Activity activity, String name, Object defaultService) { if (systemServiceProvider != null) diff --git a/library/src/main/java/com/smartnsoft/droid4me/app/Droid4mizer.java b/library/src/main/java/com/smartnsoft/droid4me/app/Droid4mizer.java index dfc43b91..920baed9 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/app/Droid4mizer.java +++ b/library/src/main/java/com/smartnsoft/droid4me/app/Droid4mizer.java @@ -586,6 +586,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) * @return the service or {@code null} if the name does not exist * @see Context#getSystemService(String) */ + @Deprecated public Object getSystemService(String name, Object defaultService) { return ActivityController.getInstance().getSystemService(activity, name, defaultService); diff --git a/library/src/main/java/com/smartnsoft/droid4me/app/SmartActivity.java b/library/src/main/java/com/smartnsoft/droid4me/app/SmartActivity.java index c8e68bdc..b3fe0efb 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/app/SmartActivity.java +++ b/library/src/main/java/com/smartnsoft/droid4me/app/SmartActivity.java @@ -139,12 +139,6 @@ protected void onDestroy() } } - @Override - public Object getSystemService(String name) - { - return droid4mizer.getSystemService(name, super.getSystemService(name)); - } - @Override public void onAttachedToWindow() { diff --git a/library/src/main/java/com/smartnsoft/droid4me/app/SmartPreferenceActivity.java b/library/src/main/java/com/smartnsoft/droid4me/app/SmartPreferenceActivity.java index 313570ee..88ac3b76 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/app/SmartPreferenceActivity.java +++ b/library/src/main/java/com/smartnsoft/droid4me/app/SmartPreferenceActivity.java @@ -155,12 +155,6 @@ protected void onDestroy() } } - @Override - public Object getSystemService(String name) - { - return droid4mizer.getSystemService(name, super.getSystemService(name)); - } - @Override public void onAttachedToWindow() { diff --git a/library/src/main/java/com/smartnsoft/droid4me/support/v4/app/SmartFragmentActivity.java b/library/src/main/java/com/smartnsoft/droid4me/support/v4/app/SmartFragmentActivity.java index 47f3f506..68bb3fbe 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/support/v4/app/SmartFragmentActivity.java +++ b/library/src/main/java/com/smartnsoft/droid4me/support/v4/app/SmartFragmentActivity.java @@ -22,14 +22,12 @@ package com.smartnsoft.droid4me.support.v4.app; -import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.support.v4.app.FragmentActivity; -import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -147,18 +145,6 @@ protected void onDestroy() } } - @Override - public LayoutInflater getLayoutInflater() - { - return (LayoutInflater) droid4mizer.getSystemService(Context.LAYOUT_INFLATER_SERVICE, super.getLayoutInflater()); - } - - @Override - public Object getSystemService(String name) - { - return droid4mizer.getSystemService(name, super.getSystemService(name)); - } - @Override public void onAttachedToWindow() { diff --git a/library/src/main/java/com/smartnsoft/droid4me/support/v7/app/SmartAppCompatActivity.java b/library/src/main/java/com/smartnsoft/droid4me/support/v7/app/SmartAppCompatActivity.java index 9ef83923..bc2c9310 100644 --- a/library/src/main/java/com/smartnsoft/droid4me/support/v7/app/SmartAppCompatActivity.java +++ b/library/src/main/java/com/smartnsoft/droid4me/support/v7/app/SmartAppCompatActivity.java @@ -22,14 +22,12 @@ package com.smartnsoft.droid4me.support.v7.app; -import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; -import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -147,25 +145,6 @@ protected void onDestroy() } } - @Override - public LayoutInflater getLayoutInflater() - { - return (LayoutInflater) droid4mizer.getSystemService(Context.LAYOUT_INFLATER_SERVICE, super.getLayoutInflater()); - } - - @Override - public Object getSystemService(String name) - { - if (Context.LAYOUT_INFLATER_SERVICE.equals(name) == true && getWindow() != null) - { - return droid4mizer.getSystemService(name, getWindow().getLayoutInflater()); - } - else - { - return droid4mizer.getSystemService(name, super.getSystemService(name)); - } - } - @Override public void onAttachedToWindow() { diff --git a/sample/build.gradle b/sample/build.gradle index b16b6d61..e7628eef 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -2,15 +2,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 26 + buildToolsVersion "26.0.2" defaultConfig { applicationId "com.smartnsoft.sample" minSdkVersion 16 - targetSdkVersion 25 + targetSdkVersion 26 versionCode 1 versionName "1.0" @@ -29,6 +29,6 @@ android dependencies { - compile ("com.android.support:appcompat-v7:25.3.0") - compile (project(":library")) + implementation ("com.android.support:appcompat-v7:27.0.1") + implementation (project(":library")) } diff --git a/sample/src/main/java/com/smartnsoft/droid4sample/Droid4SampleSplashScreenActivity.java b/sample/src/main/java/com/smartnsoft/droid4sample/Droid4SampleSplashScreenActivity.java index 844fe7d3..057164e6 100644 --- a/sample/src/main/java/com/smartnsoft/droid4sample/Droid4SampleSplashScreenActivity.java +++ b/sample/src/main/java/com/smartnsoft/droid4sample/Droid4SampleSplashScreenActivity.java @@ -59,7 +59,7 @@ protected Void onRetrieveBusinessObjectsCustom() { try { - Thread.sleep(15000); + Thread.sleep(2000); } catch (InterruptedException exception) {