Remove JCenter specifics (#1914)

Summary:
This removes Bintray/JCenter specific code and replaces it with a new plugin recommended by [Chris Banes](https://chris.banes.dev/publishing-to-maven-central/).

Pull Request resolved: https://github.com/facebook/flipper/pull/1914

Test Plan:
Manually uploaded as snapshot and full release, but with this setup still requires all sorts of manual setup, including GPG. Next PR will include automation for this.

CI here should also verify that I didn't split this diff up incorrectly.

Reviewed By: jknoxville

Differential Revision: D26367350

Pulled By: passy

fbshipit-source-id: faa6b488d6c95bc643d2f9328362e29fb4b05ded
This commit is contained in:
Pascal Hartig
2021-02-10 07:14:39 -08:00
committed by Facebook GitHub Bot
parent 800759c384
commit 87d7bcf274
17 changed files with 14 additions and 417 deletions

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties" || echo "")"
if [ "$ANDROID_PUBLISH_KEY" == "" ]; then
echo "No encryption key. Skipping snapshot deployment."
exit
elif [ "$IS_SNAPSHOT" != "" ]; then
echo "Build appears to be a SNAPSHOT release, but this is a script for building stable releases. Skipping ..."
exit 1
else
openssl aes-256-cbc -d -in scripts/bintray-publish-keys.enc -k "$ANDROID_PUBLISH_KEY" >> "$BASEDIR/gradle.properties"
# Need to list the projects individually here because of a bug in the gradle-bintray-plugin that
# tries to upload projects not meant for distribution (like our root project) and throws an NPE
# in that case.
"$BASEDIR"/gradlew :android:bintrayUpload :noop:bintrayUpload :fresco-plugin:bintrayUpload :network-plugin:bintrayUpload :litho-plugin:bintrayUpload :leakcanary-plugin:bintrayUpload -PdryRun=false
fi