Skip to content

Commit

Permalink
feat(targets): update lottie-android to 3.0.1 (#206)
Browse files Browse the repository at this point in the history
feat(targets): use androidx appcompat
feat(examples): use androidx appcompat and lottie 3.0.1
feat(examples): update Gradle to 3.4.2
  • Loading branch information
Westin Newell committed Nov 14, 2019
1 parent 880d99f commit c13c737
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 36 deletions.
4 changes: 2 additions & 2 deletions examples/lorem-ipsum/examples/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation "com.airbnb.android:lottie:2.7.0"
implementation "com.airbnb.android:lottie:3.0.1"

implementation project(':diez')
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.diez.examples.loremipsum
import android.content.res.Resources
import android.graphics.drawable.PaintDrawable
import android.graphics.drawable.shapes.RectShape
import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.TypedValue
import kotlinx.android.synthetic.main.activity_main.*
Expand Down
4 changes: 2 additions & 2 deletions examples/lorem-ipsum/examples/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.31'
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 3 additions & 0 deletions examples/lorem-ipsum/examples/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ org.gradle.jvmargs=-Xmx1536m
# org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.diez.examples.poodlesurfjava" >

<application
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.diez.examples.poodlesurfjava;

import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

import org.diez.poodleSurf.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand All @@ -16,4 +16,4 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
8 changes: 4 additions & 4 deletions examples/poodle-surf/examples/android-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ buildscript {
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -20,7 +20,7 @@ allprojects {
repositories {
google()
jcenter()

}
}

Expand Down
3 changes: 2 additions & 1 deletion examples/poodle-surf/examples/android-java/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true


android.useAndroidX=true
android.enableJetifier=true
4 changes: 2 additions & 2 deletions examples/poodle-surf/examples/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:coordinatorlayout:28.0.0'
implementation 'com.android.support:design:28.0.0'

implementation 'com.airbnb.android:lottie:2.7.0'
implementation 'com.airbnb.android:lottie:3.0.1'
implementation 'de.hdodenhof:circleimageview:3.0.0'

implementation project(':diez')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.diez.examples.poodlesurf">
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.diez.examples.poodlesurf">

<uses-permission android:name="android.permission.INTERNET"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package org.diez.examples.poodlesurf

import android.animation.Animator
import android.content.res.Resources
import android.graphics.drawable.GradientDrawable
import android.graphics.drawable.PaintDrawable
import android.graphics.drawable.shapes.RectShape
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import android.util.TypedValue
import android.view.Gravity
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
Expand All @@ -12,7 +13,7 @@
android:orientation="vertical"
android:visibility="gone">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
Expand All @@ -22,7 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

<ScrollView
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion examples/poodle-surf/examples/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 3 additions & 0 deletions examples/poodle-surf/examples/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ org.gradle.jvmargs=-Xmx1536m
# org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion packages/targets/sources/android/bindings/Color.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{{packageName}}}

import android.graphics.Color as CoreColor
import android.support.v4.graphics.ColorUtils
import androidx.core.graphics.ColorUtils

{{> androidDataClassStart }}

Expand Down
4 changes: 2 additions & 2 deletions packages/targets/sources/android/bindings/Image.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import android.graphics.BitmapFactory
import android.graphics.Shader
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.support.v4.content.res.ResourcesCompat
import android.support.v7.widget.Toolbar
import androidx.core.content.res.ResourcesCompat
import androidx.appcompat.widget.Toolbar
import android.view.View
import com.bumptech.glide.Glide
import com.bumptech.glide.request.target.SimpleTarget
Expand Down
2 changes: 1 addition & 1 deletion packages/targets/sources/android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ buildscript {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "com.squareup.moshi:moshi:$moshi_min_version+"
// Note: this adapter uses a bulky and slow reflection implementation.
// TODO: replace this with codegen-based solution.
Expand Down
2 changes: 1 addition & 1 deletion packages/targets/src/bindings/Lottie/android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const binding: AndroidBinding<Lottie> = {
dependencies: [{
gradle: {
name: 'lottie',
minVersion: '2.7.0',
minVersion: '3.0.1',
source: 'com.airbnb.android:lottie',
},
}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ android {
buildscript {
ext.moshi_min_version = '1.8.0'
ext.glide_min_version = '4.9.0'
ext.lottie_min_version = '2.7.0'
ext.lottie_min_version = '3.0.1'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "com.squareup.moshi:moshi:$moshi_min_version+"
// Note: this adapter uses a bulky and slow reflection implementation.
// TODO: replace this with codegen-based solution.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.diez.stub

import android.graphics.Color as CoreColor
import android.support.v4.graphics.ColorUtils
import androidx.core.graphics.ColorUtils

data class Color(
val h: Float,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import android.graphics.BitmapFactory
import android.graphics.Shader
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.support.v4.content.res.ResourcesCompat
import android.support.v7.widget.Toolbar
import androidx.core.content.res.ResourcesCompat
import androidx.appcompat.widget.Toolbar
import android.view.View
import com.bumptech.glide.Glide
import com.bumptech.glide.request.target.SimpleTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ buildscript {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "com.squareup.moshi:moshi:$moshi_min_version+"
// Note: this adapter uses a bulky and slow reflection implementation.
// TODO: replace this with codegen-based solution.
Expand Down

0 comments on commit c13c737

Please sign in to comment.