Skip to content

Commit

Permalink
Test version and package fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkoop committed Sep 21, 2023
1 parent fdf73fd commit 474766f
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 72 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,54 +74,54 @@ jobs:
signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
signing_key_pwd: ${{ secrets.SIGNING_KEY_PASSWORD }}
signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
- name: Close and Release Repository
uses: ./.github/actions/close_and_release_repository
with:
sonatype_usr: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatype_pwd: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
signing_key_pwd: ${{ secrets.SIGNING_KEY_PASSWORD }}
signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
bump_version:
needs: [ publish ]
name: Bump Version
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set GitHub User
uses: ./.github/actions/set_github_user
- name: Update Version
run: |
./gradlew -PversionParam=${{ github.event.inputs.version }} changeGradleReleaseVersion
./gradlew -PversionParam=${{ github.event.inputs.version }} changeREADMEVersion
./gradlew -PversionParam=${{ github.event.inputs.version }} changeMigrationGuideVersion
./gradlew -PversionParam=${{ github.event.inputs.version }} updateCHANGELOGVersion
git commit -am 'Release ${{ github.event.inputs.version }}'
git tag ${{ github.event.inputs.version }} -a -m 'Release ${{ github.event.inputs.version }}'
./gradlew -PversionParam=${{ github.event.inputs.version }} incrementSNAPSHOTVersion
./gradlew incrementVersionCode
git commit -am 'Prepare for development'
git push origin master ${{ github.event.inputs.version }}
create_github_release:
needs: [ bump_version ]
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Save changelog entries to a file
run: |
sed -e '1,/##/d' -e '/##/,$d' CHANGELOG.md > changelog_entries.md
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body_path: changelog_entries.md
draft: false
prerelease: false
# - name: Close and Release Repository
# uses: ./.github/actions/close_and_release_repository
# with:
# sonatype_usr: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
# sonatype_pwd: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
# signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
# signing_key_pwd: ${{ secrets.SIGNING_KEY_PASSWORD }}
# signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}
# bump_version:
# needs: [ publish ]
# name: Bump Version
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
# - name: Set GitHub User
# uses: ./.github/actions/set_github_user
# - name: Update Version
# run: |
# ./gradlew -PversionParam=${{ github.event.inputs.version }} changeGradleReleaseVersion
# ./gradlew -PversionParam=${{ github.event.inputs.version }} changeREADMEVersion
# ./gradlew -PversionParam=${{ github.event.inputs.version }} changeMigrationGuideVersion
# ./gradlew -PversionParam=${{ github.event.inputs.version }} updateCHANGELOGVersion
# git commit -am 'Release ${{ github.event.inputs.version }}'
# git tag ${{ github.event.inputs.version }} -a -m 'Release ${{ github.event.inputs.version }}'
#
# ./gradlew -PversionParam=${{ github.event.inputs.version }} incrementSNAPSHOTVersion
# ./gradlew incrementVersionCode
# git commit -am 'Prepare for development'
# git push origin master ${{ github.event.inputs.version }}
# create_github_release:
# needs: [ bump_version ]
# name: Create GitHub Release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
# - name: Save changelog entries to a file
# run: |
# sed -e '1,/##/d' -e '/##/,$d' CHANGELOG.md > changelog_entries.md
# - name: Create GitHub release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.event.inputs.version }}
# release_name: ${{ github.event.inputs.version }}
# body_path: changelog_entries.md
# draft: false
# prerelease: false
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Braintree Android Drop-In Release Notes

## unreleased

* Internal fixes

## 6.13.0

* Bump braintree_android module dependency versions to `4.38.2`
Expand Down
18 changes: 2 additions & 16 deletions Drop-In/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,28 +109,14 @@ dependencies {

// region signing and publishing

task javadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
failOnError false
}

task javadocsJar(type: Jar, dependsOn: javadocs) {
archiveClassifier.set('javadoc')
from javadocs.destinationDir
}

task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

repositories {
mavenCentral()
}

project.ext.name = "drop-in"
project.ext.pom_name = "drop-in"
project.ext.group_id = "com.braintreepayments.api"
project.ext.version = rootProject.version
project.ext.pom_desc = "Drop-in payment form for Braintree\'s Android SDK. Integrate this library to add a readymade UI for your payments."

apply from: rootProject.file("gradle/gradle-publish.gradle")
Expand Down
21 changes: 16 additions & 5 deletions gradle/gradle-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId group
version project.version
groupId project.ext.group_id
version project.ext.version
artifactId project.ext.name
from components.release
artifact sourcesJar
artifact androidSourcesJar
artifact javadocsJar

pom {
Expand Down Expand Up @@ -52,13 +52,24 @@ afterEvaluate {
}
}

task javadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
failOnError false
}

task javadocsJar(type: Jar, dependsOn: javadocs) {
archiveClassifier.set('javadoc')
from javadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
from android.sourceSets.main.kotlin.srcDirs
}

artifacts {
archives sourcesJar
archives androidSourcesJar
archives javadocsJar
}
}

0 comments on commit 474766f

Please sign in to comment.