Fixed lottie-compose POM dependency
diff --git a/build.gradle b/build.gradle
index aee62c9..b3ec3c1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,6 +21,8 @@
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
classpath 'org.ajoberstar:grgit:1.9.3'
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.6"
+ classpath 'com.vanniktech:gradle-maven-publish-plugin:0.13.0'
+ classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.10.2'
}
}
diff --git a/lottie-compose/build.gradle b/lottie-compose/build.gradle
index b0d6047..00c76f4 100644
--- a/lottie-compose/build.gradle
+++ b/lottie-compose/build.gradle
@@ -1,8 +1,8 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
+ id 'com.vanniktech.maven.publish'
}
-apply from: 'gradle-maven-push.gradle'
android {
compileSdkVersion 30
@@ -39,8 +39,7 @@
dependencies {
api project(':lottie')
+ implementation "androidx.compose.foundation:foundation:$composeVersion"
implementation "androidx.compose.ui:ui:$composeVersion"
- implementation "androidx.compose.material:material:$composeVersion"
- implementation "androidx.compose.material:material-icons-extended:$composeVersion"
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.0-beta01'
}
\ No newline at end of file
diff --git a/lottie-compose/gradle-maven-push.gradle b/lottie-compose/gradle-maven-push.gradle
deleted file mode 100644
index 436040a..0000000
--- a/lottie-compose/gradle-maven-push.gradle
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2013 Chris Banes
- *
- * 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: 'maven'
-apply plugin: 'signing'
-
-def isReleaseBuild() {
- return VERSION_NAME.contains("SNAPSHOT") == false
-}
-
-def getReleaseRepositoryUrl() {
- return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
- : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
-}
-
-def getSnapshotRepositoryUrl() {
- return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
- : "https://oss.sonatype.org/content/repositories/snapshots/"
-}
-
-def getRepositoryUsername() {
- return hasProperty('SONATYPE_USERNAME') ? SONATYPE_USERNAME : ""
-}
-
-def getRepositoryPassword() {
- return hasProperty('SONATYPE_PASSWORD') ? SONATYPE_PASSWORD : ""
-}
-
-afterEvaluate { project ->
- uploadArchives {
- repositories {
- mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
- pom.withXml {
- asNode().dependencies.dependency.findAll {
- it.artifactId.text() == 'okhttp' || it.artifactId.text() == 'jackson-databind'
- }.each {
- if (it.optional)
- it.optional.value = 'true'
- else
- it.appendNode('optional', 'true')
- }
- }
-
- pom.groupId = GROUP
- pom.artifactId = POM_ARTIFACT_ID
- pom.version = VERSION_NAME
-
- repository(url: getReleaseRepositoryUrl()) {
- authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
- }
- snapshotRepository(url: getSnapshotRepositoryUrl()) {
- 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_LICENSE_NAME
- url POM_LICENSE_URL
- distribution POM_LICENSE_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) {
- failOnError false
- source = android.sourceSets.main.java.srcDirs
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
- }
-
- task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
- classifier = 'javadoc'
- from androidJavadocs.destinationDir
- }
-
- task androidSourcesJar(type: Jar) {
- classifier = 'sources'
- from android.sourceSets.main.java.sourceFiles
- }
-
- artifacts {
- archives androidSourcesJar
- archives androidJavadocsJar
- }
-}
diff --git a/lottie-compose/gradle.properties b/lottie-compose/gradle.properties
index 75bbfc5..7f28ad1 100644
--- a/lottie-compose/gradle.properties
+++ b/lottie-compose/gradle.properties
@@ -1,5 +1,7 @@
POM_NAME=Lottie Compose
+POM_DESCRIPTION=Lottie for Jetpack Compose.
+POM_INCEPTION_YEAR=2020
POM_ARTIFACT_ID=lottie-compose
POM_PACKAGING=aar
GROUP=com.airbnb.android
-VERSION_NAME=1.0.0-alpha02-SNAPSHOT
\ No newline at end of file
+VERSION_NAME=1.0.0-alpha03
\ No newline at end of file
diff --git a/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt b/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
index 189f87c..dc2cf2c 100644
--- a/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
+++ b/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
@@ -15,9 +15,9 @@
import androidx.lifecycle.LifecycleOwner
import java.util.concurrent.TimeUnit
import androidx.compose.runtime.getValue
-import androidx.compose.ui.util.lerp
import com.airbnb.lottie.*
import com.airbnb.lottie.utils.Logger
+import com.airbnb.lottie.utils.MiscUtils.lerp
import java.io.FileInputStream
import java.util.zip.ZipInputStream
import kotlin.math.floor
diff --git a/lottie/build.gradle b/lottie/build.gradle
index 95b4754..3c2575b 100644
--- a/lottie/build.gradle
+++ b/lottie/build.gradle
@@ -1,8 +1,8 @@
import net.ltgt.gradle.errorprone.CheckSeverity
-apply from: 'gradle-maven-push.gradle'
apply plugin: 'com.android.library'
apply plugin: 'net.ltgt.errorprone'
+apply plugin: 'com.vanniktech.maven.publish'
android {
compileSdkVersion 29
@@ -30,14 +30,16 @@
dependencies {
implementation "androidx.appcompat:appcompat:1.0.0"
- testImplementation "org.mockito:mockito-core:2.15.0"
- testImplementation 'junit:junit:4.12'
- testImplementation "org.robolectric:robolectric:4.3.1"
- // Do not ugprade to 2.0 because it will bring in Kotlin as a transitive dependency.
+ // Do not upgrade to 2.0 because it will bring in Kotlin as a transitive dependency.
implementation("com.squareup.okio:okio:1.17.4")
+
annotationProcessor "com.uber.nullaway:nullaway:0.7.5"
errorprone "com.google.errorprone:error_prone_core:2.3.2"
errorproneJavac "com.google.errorprone:javac:9+181-r4173-1"
+
+ testImplementation "org.mockito:mockito-core:2.15.0"
+ testImplementation 'junit:junit:4.12'
+ testImplementation "org.robolectric:robolectric:4.3.1"
}
task sourcesJar(type: Jar) {
diff --git a/lottie/gradle-maven-push.gradle b/lottie/gradle-maven-push.gradle
deleted file mode 100644
index 436040a..0000000
--- a/lottie/gradle-maven-push.gradle
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2013 Chris Banes
- *
- * 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: 'maven'
-apply plugin: 'signing'
-
-def isReleaseBuild() {
- return VERSION_NAME.contains("SNAPSHOT") == false
-}
-
-def getReleaseRepositoryUrl() {
- return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
- : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
-}
-
-def getSnapshotRepositoryUrl() {
- return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
- : "https://oss.sonatype.org/content/repositories/snapshots/"
-}
-
-def getRepositoryUsername() {
- return hasProperty('SONATYPE_USERNAME') ? SONATYPE_USERNAME : ""
-}
-
-def getRepositoryPassword() {
- return hasProperty('SONATYPE_PASSWORD') ? SONATYPE_PASSWORD : ""
-}
-
-afterEvaluate { project ->
- uploadArchives {
- repositories {
- mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
- pom.withXml {
- asNode().dependencies.dependency.findAll {
- it.artifactId.text() == 'okhttp' || it.artifactId.text() == 'jackson-databind'
- }.each {
- if (it.optional)
- it.optional.value = 'true'
- else
- it.appendNode('optional', 'true')
- }
- }
-
- pom.groupId = GROUP
- pom.artifactId = POM_ARTIFACT_ID
- pom.version = VERSION_NAME
-
- repository(url: getReleaseRepositoryUrl()) {
- authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
- }
- snapshotRepository(url: getSnapshotRepositoryUrl()) {
- 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_LICENSE_NAME
- url POM_LICENSE_URL
- distribution POM_LICENSE_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) {
- failOnError false
- source = android.sourceSets.main.java.srcDirs
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
- }
-
- task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
- classifier = 'javadoc'
- from androidJavadocs.destinationDir
- }
-
- task androidSourcesJar(type: Jar) {
- classifier = 'sources'
- from android.sourceSets.main.java.sourceFiles
- }
-
- artifacts {
- archives androidSourcesJar
- archives androidJavadocsJar
- }
-}