Skip to content

Commit

Permalink
Upgrade the release process in line with vannitech library upgrade so…
Browse files Browse the repository at this point in the history
… that we can release again. (#281)

* Fixed issues with upload

* Enable signing of the artifact

* Fix publishing file

* Fixes

* Nit

* testing something

* Comment out alternate maven repository
  • Loading branch information
vinaygaba committed Dec 9, 2022
1 parent 5eba052 commit f2636d3
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 61 deletions.
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.KSP_VERSION = '1.7.10-1.0.6'

ext.versions = [
'androidXTestCore' : '1.4.0',
'androidXTestRules' : '1.4.0',
Expand Down Expand Up @@ -30,6 +29,7 @@ buildscript {
'testParameterInjector' : '1.8',
'googleTruth' : '1.1.3',
'material' : '1.4.0',
'mavenPublish' : '0.22.0',
'mdcComposeThemeAdapter' : '1.0.2',
'strikt' : '0.33.0',
'xprocessing' : '2.4.3',
Expand Down Expand Up @@ -86,6 +86,7 @@ buildscript {
'xprocessing' : "androidx.room:room-compiler-processing:${versions.xprocessing}",
'xprocessingTesting' : "androidx.room:room-compiler-processing-testing:${versions.xprocessing}",
]
ext.MAVEN_PUBLISH_VERSION = versions.mavenPublish
repositories {
google()
mavenCentral()
Expand All @@ -96,6 +97,7 @@ buildscript {
classpath "com.android.tools.build:gradle:${versions.gradle}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "com.karumi:shot:${versions.shot}"
classpath "com.vanniktech:gradle-maven-publish-plugin:${versions.mavenPublish}"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -105,6 +107,7 @@ buildscript {
plugins {
id "io.gitlab.arturbosch.detekt" version "1.7.4"
id "com.google.devtools.ksp" version "$KSP_VERSION"
id "com.vanniktech.maven.publish" version "$MAVEN_PUBLISH_VERSION"
}

allprojects {
Expand All @@ -115,7 +118,3 @@ allprojects {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ android.useAndroidX=true
android.enableJetifier=false
kotlin.code.style=official
kapt.include.compile.classpath=false
RELEASE_SIGNING_ENABLED=true
SONATYPE_HOST=DEFAULT

VERSION_NAME=1.0.0-beta14
GROUP=com.airbnb.android
Expand Down
16 changes: 16 additions & 0 deletions publishing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apply plugin: 'com.vanniktech.maven.publish'

// https://vanniktech.github.io/gradle-maven-publish-plugin/other/
publishing {
// Uncomment to configure custom maven repository
// repositories {
// maven {
// name = ""
// url = ""
// credentials {
// username = getProperty("mavenCentralUsername")
// password = getProperty("mavenCentralPassword")
// }
// }
// }
}
12 changes: 1 addition & 11 deletions showkase-annotation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
buildscript {
repositories {
mavenCentral()
}
// Maven artifact publish
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.19.0'
}
}

plugins {
id 'java-library'
id 'kotlin'
}
apply plugin: "com.vanniktech.maven.publish"
apply from: "$rootDir/publishing.gradle"

java {
sourceCompatibility = JavaVersion.VERSION_11
Expand Down
12 changes: 1 addition & 11 deletions showkase-processor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
buildscript {
repositories {
mavenCentral()
}
// Maven artifact publish
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.19.0'
}
}

plugins {
id 'java-library'
id 'kotlin'
}
apply plugin: "com.vanniktech.maven.publish"
apply from: "$rootDir/publishing.gradle"

java {
sourceCompatibility = JavaVersion.VERSION_11
Expand Down
2 changes: 1 addition & 1 deletion showkase-screenshot-testing-paparazzi-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (project.hasProperty('useKsp')) {
}

android {
compileSdk 32
compileSdkVersion 32
// Added to avoid this error -
// Execution failed for task ':showkase-processor-testing:mergeDebugAndroidTestJavaResource'.
// > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Expand Down
12 changes: 1 addition & 11 deletions showkase-screenshot-testing-shot/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
buildscript {
repositories {
mavenCentral()
}
// Maven artifact publish
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.19.0'
}
}

plugins {
id 'com.android.library'
id 'kotlin-android'
id 'shot'
}
apply plugin: "com.vanniktech.maven.publish"
apply from: "$rootDir/publishing.gradle"

android {
compileSdkVersion 32
Expand Down
12 changes: 1 addition & 11 deletions showkase-screenshot-testing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
buildscript {
repositories {
mavenCentral()
}
// Maven artifact publish
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.19.0'
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: "com.vanniktech.maven.publish"
apply from: "$rootDir/publishing.gradle"

android {
compileSdkVersion 32
Expand Down
12 changes: 1 addition & 11 deletions showkase/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
buildscript {
repositories {
mavenCentral()
}
// Maven artifact publish
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.19.0'
}
}

plugins {
id 'com.android.library'
id 'kotlin-android'
}
apply plugin: "com.vanniktech.maven.publish"
apply from: "$rootDir/publishing.gradle"

android {
compileSdkVersion 32
Expand Down

0 comments on commit f2636d3

Please sign in to comment.