Skip to content

Commit

Permalink
Merge branch 'release/v1.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 4, 2015
2 parents b9ed1e5 + 98de2bc commit af148d6
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 39 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Android-Iconics Library is pushed to [Maven Central], so you just need to ad

```gradle
dependencies {
compile 'com.mikepenz:iconics:1.6.0@aar'
compile 'com.mikepenz:iconics:1.6.1@aar'
}
```

Expand All @@ -35,7 +35,7 @@ Provide your own font without the additional icons

```gradle
dependencies {
compile 'com.mikepenz:iconics-core:1.6.0@aar'
compile 'com.mikepenz:iconics-core:1.6.1@aar'
}
```

Expand Down Expand Up @@ -131,7 +131,7 @@ Just add the dependency of any and as many typface-library-addons in your build.

```javascript
dependencies {
compile 'com.mikepenz:iconics:1.6.0@aar'
compile 'com.mikepenz:iconics:1.6.1@aar'
compile 'com.mikepenz:octicons-typeface:2.2.1@aar'
compile 'com.mikepenz:meteocons-typeface:1.1.2@aar'
compile 'com.mikepenz:community-material-typeface:1.1.71@aar'
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 152
versionName "1.5.2"
versionCode 161
versionName "1.6.1"
enforceUniquePackageName false
}

Expand Down
4 changes: 2 additions & 2 deletions library-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 160
versionName "1.6.0"
versionCode 161
versionName "1.6.1"
}
buildTypes {
release {
Expand Down
4 changes: 2 additions & 2 deletions library-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
# 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
VERSION_NAME=1.6.0
VERSION_CODE=160
VERSION_NAME=1.6.1
VERSION_CODE=161

POM_NAME=Android-Iconics Library
POM_ARTIFACT_ID=iconics-core
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mikepenz.iconics.utils;

import android.content.Context;
import android.text.TextUtils;

import java.lang.reflect.Field;
import java.util.ArrayList;
Expand All @@ -10,15 +11,16 @@
*/
public class GenericsUtil {

/**
* a helper to get the string fields from the R class
*
* @param ctx
* @return
*/
public static String[] getFields(Context ctx) {
Class rClass = resolveRClass(ctx.getPackageName());

if (rClass != null) {
for (Class c : rClass.getClasses()) {
if (c.getName().endsWith("string")) {
return getDefinedFonts(ctx, c.getFields());
}
}
Class rStringClass = resolveRClass(ctx.getPackageName());
if (rStringClass != null) {
return getDefinedFonts(ctx, rStringClass.getFields());
}
return new String[0];
}
Expand All @@ -30,25 +32,17 @@ public static String[] getFields(Context ctx) {
* @return
*/
private static Class resolveRClass(String packageName) {
try {
return Class.forName(packageName + ".R");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
try {
return Class.forName(packageName.replace(".debug", "") + ".R");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
try {
return Class.forName(packageName.replace(".release", "") + ".R");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
do {
try {
return Class.forName(packageName + ".R$string");
} catch (ClassNotFoundException e) {
packageName = packageName.contains(".") ? packageName.substring(0, packageName.lastIndexOf('.')) : "";
}
} while (!TextUtils.isEmpty(packageName));

return null;
}


/**
* A helper method to get a String[] out of a fieldArray
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Android-Iconics is a library to use (almost) any alternative icon-font in your projects. It allows you to add any Android-Iconics compatible typeface-library-addon to your project and you are able to start using that font.
]]>
</string>
<string name="library_AndroidIconics_libraryVersion">1.5.2</string>
<string name="library_AndroidIconics_libraryVersion">1.6.1</string>
<string name="library_AndroidIconics_libraryWebsite">https://github.com/mikepenz/Android-Iconics</string>
<string name="library_AndroidIconics_licenseId">apache_2_0</string>
<string name="library_AndroidIconics_isOpenSource">true</string>
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 160
versionName "1.6.0"
versionCode 161
versionName "1.6.1"
}
buildTypes {
release {
Expand All @@ -25,5 +25,5 @@ if (project.hasProperty('pushall') || project.hasProperty('libraryonly')) {
}

dependencies {
compile "com.mikepenz:iconics-core:1.6.0"
compile "com.mikepenz:iconics-core:1.6.1"
}
4 changes: 2 additions & 2 deletions library/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
# 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
VERSION_NAME=1.6.0
VERSION_CODE=160
VERSION_NAME=1.6.1
VERSION_CODE=161

POM_NAME=Android-Iconics Library
POM_ARTIFACT_ID=iconics
Expand Down

0 comments on commit af148d6

Please sign in to comment.