Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven release docs #1087

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install NDK 21
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
- name: Install dependencies
run: |
if [[ -n "${{ secrets.encrypted_d27e803291ff_iv }}" ]]; then
Expand All @@ -44,13 +50,9 @@ jobs:
cd buck
ant
popd
echo "::set-env name=PATH::$PATH:$HOME/buck/bin/"
echo "$HOME/buck/bin" >> $GITHUB_PATH
export PATH=$PATH:$HOME/buck/bin/
buck --version
export TERMINAL=dumb
source scripts/android-setup.sh && installAndroidSDK
echo "::set-env name=ANDROID_SDK::$ANDROID_HOME"
echo "::set-env name=ANDROID_NDK_REPOSITORY::$HOME/android-ndk"
echo "::set-env name=ANDROID_NDK_HOME::$ANDROID_NDK_REPOSITORY/android-ndk-r15c"
- name: Build
run: ./gradlew testDebugUnit && scripts/publish-snapshot.sh
# TODO: Run the tests here again. They're currently crashing the JVM in GitHub Actions for some reason.
run: ./gradlew :yoga-layout:assembleDebug && scripts/publish-snapshot.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
/.buckd
/gentest/test.html
.buckversion
.cxx
.idea
/local.properties

# Jekyll
/.sass-cache/
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,29 @@ This will now only run the standalone webpack build upon install.
| node | Builds node js version. |
| standalone | Runs webpack. |
| none | Does nothing. You can use the prepackaged libs. |

## Maintainer Release Guide

To publish a new release, follow these steps:

1. Ensure you have your GPG key set up and your [OSS Sonatype](https://oss.sonatype.org/) credentials handy.
2. Add the follow entries to either your local `gradle.properties` (don't forget to revert) or your global `~/.gradle/gradle.properties`:

```
# You get these from https://oss.sonatype.org/#profile;User%20Token
mavenCentralRepositoryUsername=<username>
mavenCentralRepositoryPassword=<password>

# You can get the keyId (in GPG 1.4 format) by running `gpg1 --list-keys`.
signing.secretKeyRingFile=</path/to/secring.gpg>
signing.keyId=<key_id>
signing.password=<key_password>
```

3. Change the `VERSION_NAME` in `gradle.properties` to a non-SNAPSHOT release.
4. Commit and land the version change.
5. Run `./gradlew publishToMaven`.
6. Run `./gradlew closeAndReleaseRepository`.
7. Change the `VERSION_NAME` in `gradle.properties` back to a new SNAPSHOT release.
8. Commit and land the version change.
9. Celebrate! You've made a release!
28 changes: 6 additions & 22 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/

apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

version = VERSION_NAME
group = GROUP

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -32,21 +27,10 @@ dependencies {
api project(':yoga')
}

task sourcesJar(type: Jar) {
classifier = 'source'
from android.sourceSets.main.java.srcDirs
}

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

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
// We don't build Javadoc at this time as we can't disable "BUCK" files
// from mistakenly getting parsed as Java.
tasks.withType(Javadoc).all {
enabled = false
}

apply from: rootProject.file('gradle/release.gradle')
apply plugin: 'com.vanniktech.maven.publish'
18 changes: 8 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com/' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.15.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -26,15 +23,16 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

ext {
minSdkVersion = 14
targetSdkVersion = 25
compileSdkVersion = 26
buildToolsVersion = '28.0.3'
targetSdkVersion = 29
compileSdkVersion = 29
buildToolsVersion = '30.0.2'
ndkVersion = '21.3.6528147'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@

org.gradle.jvmargs=-Xmx1536M

VERSION_NAME=1.17.0-SNAPSHOT
VERSION_NAME=1.18.0
POM_URL=https://github.com/facebook/yoga
POM_SCM_URL=https://github.com/facebook/yoga.git
POM_SCM_CONNECTION=scm:git:https://github.com/facebook/yoga.git
POM_SCM_DEV_CONNECTION=scm:git:git@github.com:facebook/yoga.git
POM_LICENSE_NAME=MIT License
POM_LICENSE_URL=https://github.com/facebook/yoga/blob/master/LICENSE
POM_LICENSE_DIST=repo
POM_LICENCE_NAME=MIT License
POM_LICENCE_URL=https://github.com/facebook/yoga/blob/master/LICENSE
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=facebook
POM_DEVELOPER_NAME=facebook
44 changes: 0 additions & 44 deletions gradle/android-maven-install.gradle

This file was deleted.

54 changes: 0 additions & 54 deletions gradle/android-tasks.gradle

This file was deleted.

70 changes: 0 additions & 70 deletions gradle/bintray.gradle

This file was deleted.

Loading