Skip to content

Commit

Permalink
Updated gradle dependencies and fixed minor warnings, preparing for r…
Browse files Browse the repository at this point in the history
…efactor to add Kotlin support
  • Loading branch information
aserrano-phun committed Sep 29, 2018
1 parent 25623c2 commit 8b7c284
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 21 deletions.
14 changes: 7 additions & 7 deletions ExampleApp/build.gradle
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.codesgood.justifiedtext"
minSdkVersion 10
targetSdkVersion 25
minSdkVersion 14
targetSdkVersion 28
versionCode 3
versionName '1.0.2'
}
Expand All @@ -22,7 +22,7 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':JustifiedTextView')
compile 'com.android.support:appcompat-v7:25.3.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':Library')
implementation 'com.android.support:appcompat-v7:28.0.0'
}
File renamed without changes.
10 changes: 5 additions & 5 deletions JustifiedTextView/build.gradle → Library/build.gradle
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
minSdkVersion 9
targetSdkVersion 25
minSdkVersion 14
targetSdkVersion 28
versionCode 3
versionName '1.0.2'
}
Expand All @@ -22,7 +22,7 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(include: ['*.jar'], dir: 'libs')
}

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -49,7 +49,7 @@ public class JustifiedTextView extends TextView {
private int mWordsInThisSentence = 0;

//ArrayList of Strings that will contain the words of the sentence being processed
private ArrayList<String> mTemporalLine = new ArrayList<String>();
private ArrayList<String> mTemporalLine = new ArrayList<>();

private int mViewWidth;

Expand Down Expand Up @@ -154,11 +154,11 @@ private void resetLineValues(){

//Function that joins the words of the ArrayList
private String joinWords(ArrayList<String> words) {
String sentence = "";
StringBuilder sentence = new StringBuilder();
for(String word : words){
sentence += word;
sentence.append(word);
}
return sentence;
return sentence.toString();
}

//Method that inserts spaces into the words to make them fix perfectly in the width of the view. I know I'm a genius naming stuff :)
Expand All @@ -176,7 +176,7 @@ private void insertWhiteSpaces(int whiteSpacesNeeded, int wordsInThisSentence, A
int randomPosition = getRandomEvenNumber(sentence.size() - 1);
sentence.set(randomPosition, sentence.get(randomPosition) + mThinSpace);
}
} else if(whiteSpacesNeeded > wordsInThisSentence){
} else {
//I was using recursion to achieve this... but when you tried to watch the preview,
//Android Studio couldn't show any preview because a StackOverflow happened.
//So... it ended like this, with a wild while xD.
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion build.gradle
Expand Up @@ -4,9 +4,10 @@ buildscript {

repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:3.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -27,5 +28,6 @@ allprojects {

repositories {
mavenCentral()
google()
}
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Sun Mar 26 00:45:28 CST 2017
#Sat Sep 29 12:36:49 CST 2018
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.6-all.zip
2 changes: 1 addition & 1 deletion settings.gradle
@@ -1 +1 @@
include 'ExampleApp', 'JustifiedTextView'
include 'ExampleApp', 'Library'

0 comments on commit 8b7c284

Please sign in to comment.