Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phosphor Icons typeface addon #538

Merged
merged 2 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ implementation 'com.mikepenz:foundation-icons-typeface:3.0.0.7-kotlin@aar'
implementation 'com.mikepenz:ionicons-typeface:2.0.1.7-kotlin@aar'
implementation 'com.mikepenz:pixeden-7-stroke-typeface:1.2.0.5-kotlin@aar'
implementation 'com.mikepenz:material-design-icons-dx-typeface:5.0.1.2-kotlin@aar'
implementation 'com.mikepenz:phosphor-typeface:1.0.0.0-kotlinn@aar'
```

# Usage
Expand Down Expand Up @@ -193,6 +194,7 @@ This feature was suggested and initially provided by @dzamlo
|[Ionicons](http://ionicons.com/)|ion|implementation 'com.mikepenz:ionicons-typeface:+@aar'|
|[Pixden7Stroke](http://themes-pixeden.com/font-demos/7-stroke/)|pe7|implementation 'com.mikepenz:pixeden-7-stroke-typeface:+@aar'|
|[Material Design DX](https://jossef.github.io/material-design-icons-iconfont/)|cmf|implementation 'com.mikepenz:material-design-icons-dx-typeface:+@aar'|
|[Phosphor Icons](https://phosphoricons.com/)|pho|implementation 'com.mikepenz:phosphor-typeface:+@aar'|

Licenses for all included fonts are linked inside the class or can be found on the coresponding repositories.

Expand Down
20 changes: 11 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,22 @@ dependencies {

implementation project(':library-core')
implementation project(':iconics-view-library')
implementation project(':fontawesome-typeface-library')
implementation project(':material-design-iconic-typeface-library')
implementation project(':google-material-typeface-library')
implementation project(':meteocons-typeface-library')
implementation project(':weather-icons-typeface-library')
implementation project(':octicons-typeface-library')

implementation project(':community-material-typeface-library')
implementation project(':entypo-typeface-library')
implementation project(':typeicons-typeface-library')
implementation project(':devicon-typeface-library')
implementation project(':entypo-typeface-library')
implementation project(':fontawesome-typeface-library')
implementation project(':foundation-icons-typeface-library')
implementation project(':google-material-typeface-library')
implementation project(':ionicons-typeface-library')
implementation project(':pixeden-7-stroke-typeface-library')
implementation project(':material-design-dx-typeface-library')
implementation project(':material-design-iconic-typeface-library')
implementation project(':meteocons-typeface-library')
implementation project(':octicons-typeface-library')
implementation project(':phosphor-typeface-library')
implementation project(':pixeden-7-stroke-typeface-library')
implementation project(':typeicons-typeface-library')
implementation project(':weather-icons-typeface-library')

testImplementation 'junit:junit:4.13'
}
1 change: 1 addition & 0 deletions phosphor-typeface-library/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
52 changes: 52 additions & 0 deletions phosphor-typeface-library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2020 Mike Penz
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'com.android.library'

apply plugin: 'kotlin-android'

android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

defaultConfig {
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
versionCode 10000
versionName "1.0.0.0-kotlin"

resValue "string", "phosphor_version", "${versionName}"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
}
}
if (project.hasProperty('pushall') || project.hasProperty('phosphor')) {
apply from: '../gradle-release.gradle'
}

dependencies {
implementation project(':library-typeface-api')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin"
}
1 change: 1 addition & 0 deletions phosphor-typeface-library/consumer-proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class com.mikepenz.iconics.typeface.library.phosphor.Phosphor { *; }
18 changes: 18 additions & 0 deletions phosphor-typeface-library/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (c) 2020 Mike Penz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
POM_NAME=Android-Iconics Phosphor Typeface Library
POM_ARTIFACT_ID=phosphor-typeface
POM_PACKAGING=aar
17 changes: 17 additions & 0 deletions phosphor-typeface-library/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Entwicklung/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
33 changes: 33 additions & 0 deletions phosphor-typeface-library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
~ Copyright (c) 2020 Mike Penz
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.phosphor">

<application>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="com.mikepenz.iconics.typeface.library.phosphor.Initializer"
android:value="androidx.startup" />
</provider>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mikepenz.iconics.typeface.library.phosphor

import android.content.Context
import com.mikepenz.iconics.typeface.ITypeface
import com.mikepenz.iconics.typeface.IconicsHolder
import com.mikepenz.iconics.typeface.IconicsInitializer

class Initializer : androidx.startup.Initializer<ITypeface> {
override fun create(context: Context): ITypeface {
IconicsHolder.registerFont(Phosphor)
return Phosphor
}

override fun dependencies(): List<Class<out androidx.startup.Initializer<*>>> {
return listOf(IconicsInitializer::class.java)
}
}
Loading