Skip to content

Commit

Permalink
Updated libs version
Browse files Browse the repository at this point in the history
Updated compatibility
Added Styles utils
Updated WheelScroller
  • Loading branch information
mathieudebrito committed Apr 27, 2015
1 parent 740352e commit fdf2bde
Show file tree
Hide file tree
Showing 13 changed files with 209 additions and 53 deletions.
7 changes: 4 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.android.tools.build:gradle:1.1.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT TO FORGET TO ALSO CHANGE THE VERSION CODE
VERSION_NAME=0.0.3
VERSION_CODE=3
VERSION_NAME=1.0.0
VERSION_CODE=10
# DO NOT TO FORGET TO ALSO CHANGE THE VERSION CODE

GROUP=com.github.mathieudebrito
Expand Down
13 changes: 6 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ android {
buildToolsVersion "21.1.1"

// DO NOT FORGET TO ALSO UPDATE THE GRADLE.PROPERTIES
def versionMajor = 0
def versionMinor = 0
def versionPatch = 3
def versionMajor = 1
def versionMinor = 1
def versionPatch = 0
// DO NOT FORGET TO ALSO UPDATE THE GRADLE.PROPERTIES

defaultConfig {
Expand All @@ -26,18 +26,17 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:appcompat-v7:22.0.0'

// Google
compile 'com.google.android.gms:play-services-base:6.5.87'
compile 'com.google.guava:guava:18.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.nineoldandroids:library:2.4.0'

// Custom Views
compile 'com.afollestad:material-dialogs:0.6.3.4' // Material dialogs
compile 'com.github.gabrielemariotti.changeloglib:library:1.5.2' // Changelog
}

// https://github.com/chrisbanes/gradle-mvn-push
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
apply from: '../maven_local.gradle'
//apply from: '../maven_central.gradle'
33 changes: 15 additions & 18 deletions library/library.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="utils" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":library" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="utils" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
Expand All @@ -12,9 +12,10 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
Expand All @@ -26,7 +27,7 @@
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
Expand All @@ -35,12 +36,12 @@
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
Expand All @@ -62,7 +63,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/docs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
Expand All @@ -82,23 +82,20 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/poms" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.0.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.0.0" level="project" />
<orderEntry type="library" exported="" name="material-dialogs-0.6.3.4" level="project" />
<orderEntry type="library" exported="" name="play-services-base-6.5.87" level="project" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.0.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="library-1.5.2" level="project" />
<orderEntry type="library" exported="" name="guava-18.0" level="project" />
</component>
</module>

</module>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class SharedPrefs {

public static final String PREFS_CREATED = "preferences_created";
public static final String PREFS_VERSION = "preferences_version";
public static String app = "geovelo";
public static String app = "mdb";
public static boolean resetAtLaunch = false;
public static boolean resetAtVersion = false;

Expand Down
30 changes: 30 additions & 0 deletions library/src/main/java/com/github/mathieudebrito/utils/Styles.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.github.mathieudebrito.utils;

import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;

public class Styles {

public static Drawable getDrawable(TypedArray arr, int res) {
if (arr.hasValue(res)) {
return arr.getDrawable(res);
} else {
return null;
}
}

public static String getString(TypedArray arr, int res) {
if (arr.hasValue(res)) {
return arr.getString(res);
} else {
return null;
}
}
public static boolean getBoolean(TypedArray arr, int res) {
if (arr.hasValue(res)) {
return arr.getBoolean(res, false);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

package com.github.mathieudebrito.utils.views.spinnerwheel;

import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.*;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;

import com.github.mathieudebrito.utils.R;
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.ObjectAnimator;


/**
Expand Down Expand Up @@ -102,12 +102,12 @@ public abstract class AbstractWheelView extends AbstractWheel {
protected Paint mSeparatorsPaint;

/**
* {@link com.nineoldandroids.animation.Animator} for dimming the selector spinnerwheel.
* {@link Animator} for dimming the selector spinnerwheel.
*/
protected Animator mDimSelectorWheelAnimator;

/**
* {@link com.nineoldandroids.animation.Animator} for dimming the selector spinnerwheel.
* {@link Animator} for dimming the selector spinnerwheel.
*/
protected Animator mDimSeparatorsAnimator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public void stopScrolling() {
/**
* Handles Touch event
* @param event the motion event
* @return
*/
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
Expand Down
98 changes: 98 additions & 0 deletions maven_central.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
apply plugin: 'maven'
apply plugin: 'signing'

//https://github.com/chrisbanes/gradle-mvn-push/issues/44

def sonatypeRepositoryUrl
if (isReleaseBuild()) {
println 'RELEASE BUILD'
sonatypeRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
} else {
println 'DEBUG BUILD'
sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
}

def getRepositoryUsername() {
return hasProperty('nexusUsername') ? nexusUsername : ""
}

def getRepositoryPassword() {
return hasProperty('nexusPassword') ? nexusPassword : ""
}

def isReleaseBuild() {
return version.contains("SNAPSHOT") == false
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: sonatypeRepositoryUrl) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
}
}
}
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}

task androidJavadocs(type: Javadoc) {
androidJavadocs.classpath += project.android.libraryVariants.toList().first().javaCompile.classpath
}

task androidJavadocsJar(type: Jar) {
classifier = 'javadoc'
//basename = artifact_id
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
//basename = artifact_id
from android.sourceSets.main.java.srcDirs
}

artifacts {
//archives packageReleaseJar
archives androidSourcesJar
archives androidJavadocsJar
}
}
Loading

0 comments on commit fdf2bde

Please sign in to comment.