Skip to content

Commit

Permalink
Merge pull request #27 from ConteDevel/fix-api28-support
Browse files Browse the repository at this point in the history
Updates libs and build tools to the last stable versions
  • Loading branch information
erickjones authored Oct 22, 2018
2 parents a4cc430 + 3ac31c1 commit c678970
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 65 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ buildscript {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Sep 20 21:27:17 BRT 2017
#Fri Oct 19 07:43:43 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
25 changes: 18 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,38 @@ apply plugin: 'com.github.dcendents.android-maven'
group='org.bitbucket.ilhasoft'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 28
buildToolsVersion '28.0.3'

// Gradle automatically adds 'android.test.runner' as a dependency.
useLibrary 'android.test.runner'

dataBinding {
enabled true
}

defaultConfig {
minSdkVersion 15
targetSdkVersion 26
targetSdkVersion 28
versionCode 3
versionName "1.0.0"
consumerProguardFiles 'proguard-rules.pro'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
testCompile 'junit:junit:4.12'
implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'androidx.appcompat:appcompat:1.0.0'
api 'com.google.android.material:material:1.0.0'
// JUnit 4 framework
testImplementation 'junit:junit:4.12'
// Android annotations
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.1.0-beta02'
androidTestImplementation 'androidx.test:rules:1.1.0-beta02'
}

// build a jar with source files
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
package="br.com.ilhasoft.support.validation">

<application android:allowBackup="true"
android:supportsRtl="true" />
android:supportsRtl="true"/>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package br.com.ilhasoft.support.validation;

import android.databinding.ViewDataBinding;
import androidx.databinding.ViewDataBinding;
import android.view.View;
import android.view.ViewGroup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package br.com.ilhasoft.support.validation.binding;

import android.databinding.BindingAdapter;
import androidx.databinding.BindingAdapter;
import android.widget.TextView;

import br.com.ilhasoft.support.validation.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

package br.com.ilhasoft.support.validation.binding;

import android.databinding.BindingAdapter;
import androidx.databinding.BindingAdapter;
import android.widget.TextView;

import br.com.ilhasoft.support.validation.R;
import br.com.ilhasoft.support.validation.rule.EmailTypeRule;
import br.com.ilhasoft.support.validation.rule.EmptyRule;
import br.com.ilhasoft.support.validation.rule.MaxLengthRule;
import br.com.ilhasoft.support.validation.rule.MinLengthRule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package br.com.ilhasoft.support.validation.binding;

import android.databinding.BindingAdapter;
import androidx.databinding.BindingAdapter;
import android.widget.TextView;

import br.com.ilhasoft.support.validation.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package br.com.ilhasoft.support.validation.binding;

import android.databinding.BindingAdapter;
import androidx.databinding.BindingAdapter;
import android.widget.TextView;

import br.com.ilhasoft.support.validation.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package br.com.ilhasoft.support.validation.binding;

import android.databinding.BindingAdapter;
import android.support.annotation.NonNull;
import androidx.databinding.BindingAdapter;
import androidx.annotation.NonNull;
import android.widget.TextView;

import br.com.ilhasoft.support.validation.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package br.com.ilhasoft.support.validation.rule;

import android.support.annotation.StringRes;
import androidx.annotation.StringRes;
import android.widget.TextView;

import java.lang.reflect.InvocationTargetException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package br.com.ilhasoft.support.validation.util;

import android.databinding.adapters.ListenerUtil;
import android.support.annotation.Nullable;
import android.support.design.widget.TextInputLayout;
import androidx.databinding.adapters.ListenerUtil;
import androidx.annotation.Nullable;
import com.google.android.material.textfield.TextInputLayout;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package br.com.ilhasoft.support.validation.util;

import android.support.annotation.StringRes;
import androidx.annotation.StringRes;
import android.view.View;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {

@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
Expand Down
23 changes: 17 additions & 6 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 28
buildToolsVersion "28.0.3"

// Gradle automatically adds 'android.test.runner' as a dependency.
useLibrary 'android.test.runner'

dataBinding {
enabled true
Expand All @@ -11,9 +14,11 @@ android {
defaultConfig {
applicationId "br.com.ilhasoft.support.validation.sample"
minSdkVersion 15
targetSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -30,8 +35,14 @@ allprojects {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile project(':library')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')
// JUnit 4 framework
testImplementation 'junit:junit:4.12'
// Android annotations
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.1.0-beta02'
androidTestImplementation 'androidx.test:rules:1.1.0-beta02'
// compile 'org.bitbucket.ilhasoft:support-validation:e3ed964'
}
2 changes: 2 additions & 0 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<uses-library android:name="android.test.runner"
android:required="false" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package br.com.ilhasoft.support.validation.sample;

import android.databinding.DataBindingUtil;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
Expand Down
Loading

0 comments on commit c678970

Please sign in to comment.