diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 3bec19697a..7fa6aeaefe 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -39,11 +39,6 @@
-
-
-
diff --git a/RELEASING.md b/RELEASING.md
index 9e8c4cabb9..f6546c7ff3 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -5,5 +5,24 @@ Releasing
2. Update `CHANGELOG.md` for the impending release.
3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the version you set in step 1)
4. Add your sonatype login information under gradle properties mavenCentralUsername and mavenCentralPassword in your local user gradle.properties file
+5. Make sure you have a gpg signing key configured (https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets)
5. `./gradlew publish` to build the artifacts and publish them to maven
-7. Open PR on Github, merge, and publish release through Github UI.
\ No newline at end of file
+7. Open PR on Github, merge, and publish release through Github UI.
+
+Publishing a release to an internal repository
+========
+
+To publish an internal release to an Artifactory repository:
+
+1. Set credential values for ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD in your local gradle.properties
+2. Set values for ARTIFACTORY_RELEASE_URL (and optionally ARTIFACTORY_SNAPSHOT_URL if you are publishing a snapshot)
+3. /gradlew publishAllPublicationsToAirbnbArtifactoryRepository -PdoNotSignRelease=true
+4. "-PdoNotSignRelease=true" is optional, but we don't need to sign artifactory releases and this allows everyone to publish without setting up a gpg key
+
+If you need to publish to a different repository, look at the configuration in 'publishing.gradle'
+to see how to configure additional repositories.
+
+Maven Local Installation
+=======================
+
+If testing changes locally, you can install to mavenLocal via `./gradlew publishToMavenLocal`
\ No newline at end of file
diff --git a/epoxy-adapter/build.gradle b/epoxy-adapter/build.gradle
index fcae63eacb..0bec4e47ca 100644
--- a/epoxy-adapter/build.gradle
+++ b/epoxy-adapter/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/epoxy-annotations/build.gradle b/epoxy-annotations/build.gradle
index afd7c26ff2..5289ce9a30 100644
--- a/epoxy-annotations/build.gradle
+++ b/epoxy-annotations/build.gradle
@@ -1,6 +1,6 @@
apply plugin: 'java'
apply plugin: 'org.jetbrains.kotlin.jvm'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
sourceCompatibility = rootProject.JAVA_SOURCE_VERSION
targetCompatibility = rootProject.JAVA_TARGET_VERSION
diff --git a/epoxy-compose/build.gradle b/epoxy-compose/build.gradle
index 9b15a6bdea..fb995204af 100644
--- a/epoxy-compose/build.gradle
+++ b/epoxy-compose/build.gradle
@@ -3,7 +3,7 @@ plugins {
id 'kotlin-android'
id 'kotlin-kapt'
}
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/epoxy-databinding/build.gradle b/epoxy-databinding/build.gradle
index 15b550391b..f58a459a78 100644
--- a/epoxy-databinding/build.gradle
+++ b/epoxy-databinding/build.gradle
@@ -1,5 +1,5 @@
apply plugin: 'com.android.library'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/epoxy-glide-preloader/build.gradle b/epoxy-glide-preloader/build.gradle
index bf02620946..817b129048 100644
--- a/epoxy-glide-preloader/build.gradle
+++ b/epoxy-glide-preloader/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/epoxy-modelfactory/build.gradle b/epoxy-modelfactory/build.gradle
index 109fb6ad55..87315641ff 100644
--- a/epoxy-modelfactory/build.gradle
+++ b/epoxy-modelfactory/build.gradle
@@ -1,5 +1,5 @@
apply plugin: 'com.android.library'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/epoxy-paging3/build.gradle b/epoxy-paging3/build.gradle
index 77bd192381..0dd607678d 100644
--- a/epoxy-paging3/build.gradle
+++ b/epoxy-paging3/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/epoxy-processor/build.gradle b/epoxy-processor/build.gradle
index 7415f9f997..ad14223aed 100644
--- a/epoxy-processor/build.gradle
+++ b/epoxy-processor/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.kapt'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Type.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Type.kt
index 0ff6a826c5..8a437522da 100644
--- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Type.kt
+++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Type.kt
@@ -43,9 +43,11 @@ class Type(val xType: XType, memoizer: Memoizer) {
xType.isTypeOf(CharSequence::class) || xType.isTypeOf(String::class) -> StringOrCharSequence
xType.typeName == ClassNames.EPOXY_STRING_ATTRIBUTE_DATA -> StringAttributeData
// We don't care about nullability for the purposes of type checking
- nonNullType == memoizer.viewOnClickListenerType -> ViewClickListener
- nonNullType == memoizer.viewOnLongClickListenerType -> ViewLongClickListener
- nonNullType == memoizer.viewOnCheckChangedType -> ViewCheckedChangeListener
+ // Note, == does not work for type comparisons when comparing types between classpath
+ // and compiled sources so we must use isSameType.
+ nonNullType.isSameType(memoizer.viewOnClickListenerType) -> ViewClickListener
+ nonNullType.isSameType(memoizer.viewOnLongClickListenerType) -> ViewLongClickListener
+ nonNullType.isSameType(memoizer.viewOnCheckChangedType) -> ViewCheckedChangeListener
xType.isList() -> {
val listType = xType.typeArguments.singleOrNull()
@@ -55,6 +57,7 @@ class Type(val xType: XType, memoizer: Memoizer) {
else -> Unknown
}
}
+
else -> Unknown
}
}
diff --git a/epoxy-viewbinder/build.gradle b/epoxy-viewbinder/build.gradle
index 03a3a686e4..8af8d47362 100644
--- a/epoxy-viewbinder/build.gradle
+++ b/epoxy-viewbinder/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
-apply plugin: "com.vanniktech.maven.publish"
+apply from: '../publishing.gradle'
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
diff --git a/gradle.properties b/gradle.properties
index db720b1921..381f5e2c03 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-VERSION_NAME=5.1.1
+VERSION_NAME=5.1.2
GROUP=com.airbnb.android
POM_DESCRIPTION=Epoxy is a system for composing complex screens with a ReyclerView in Android.
POM_URL=https://github.com/airbnb/epoxy
@@ -21,7 +21,6 @@ org.gradle.parallel=true
# Publishing configuration for vanniktech/gradle-maven-publish-plugin
SONATYPE_HOST=DEFAULT
-RELEASE_SIGNING_ENABLED=true
SONATYPE_AUTOMATIC_RELEASE=true
# Dokka fails without a larger metaspace https://github.com/Kotlin/dokka/issues/1405
diff --git a/publishing.gradle b/publishing.gradle
new file mode 100644
index 0000000000..947f34bde4
--- /dev/null
+++ b/publishing.gradle
@@ -0,0 +1,29 @@
+// Sets up publishing of release artifacts.
+// Note: Keep this script in sync across all airbnb open source projects.
+apply plugin: 'com.vanniktech.maven.publish'
+
+
+// https://vanniktech.github.io/gradle-maven-publish-plugin/other/
+publishing {
+ repositories {
+ maven {
+ // The "name" value creates a task like `publishAllPublicationsTo[Name]Repository
+ // In this case, publishAllPublicationsToAirbnbArtifactoryRepository
+ name = 'airbnbArtifactory'
+ url = version.toString().endsWith("SNAPSHOT") ? property("ARTIFACTORY_SNAPSHOT_URL") : property("ARTIFACTORY_RELEASE_URL")
+ credentials {
+ username = getProperty("ARTIFACTORY_USERNAME")
+ password = getProperty("ARTIFACTORY_PASSWORD")
+ }
+ }
+ }
+}
+
+mavenPublishing {
+ if (findProperty("doNotSignRelease").toString().toBoolean()) {
+ println("Skipping release signing")
+ } else {
+ println("Signing release with gpg")
+ signAllPublications()
+ }
+}
\ No newline at end of file