Skip to content

Commit

Permalink
fix click listener kapt bug and update publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
elihart committed Nov 15, 2022
1 parent 109d434 commit 20ffc22
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 20 deletions.
5 changes: 0 additions & 5 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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`
2 changes: 1 addition & 1 deletion epoxy-adapter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-databinding/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-glide-preloader/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-modelfactory/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-paging3/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion epoxy-processor/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -55,6 +57,7 @@ class Type(val xType: XType, memoizer: Memoizer) {
else -> Unknown
}
}

else -> Unknown
}
}
Expand Down
2 changes: 1 addition & 1 deletion epoxy-viewbinder/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
29 changes: 29 additions & 0 deletions publishing.gradle
Original file line number Diff line number Diff line change
@@ -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()
}
}

0 comments on commit 20ffc22

Please sign in to comment.