1
0

More than 3 years have passed since last update.

Androidライブラリ公開

Last updated at Posted at 2020-11-05

2020-05に別の場所で書いた社内用メモの転記です。
変わったところがあれば修正していきます。

※2020-11-05
※公開方法、ここに書いた方法では動きませんでした。(半年前なのに。。)
※いろいろな方の記事を参考に試行錯誤してみましたが、うまくいきませんでした。
※動作する手順がわかったら、また更新します。。。

Androidライブラリの公開手順

  1. GitHubにレポジトリ作成 → Push SankoSC GitHub
  2. Bintrayにレポジトリを作る Sankosc Bintray
  3. ライブラリのbuild.gradleにpublish情報を記述

    build.gradle
    publish {
        userOrg = 'sankosc'
        groupId = 'jp.co.sankosc'
        artifactId = 'webapi-client'
        publishVersion = '1.0.0'
        desc = 'This is a Web API client library for android.'
        website = 'https://github.com/sankosc/webapi-client-android'
        artifactId = 'webapi-client'
    }
    

    artifactId, artifactId:Bintrayで登録したレポジトリ名
    website:GitHub レポジトリ
    desc:説明

  4. APIキー取得
    右上のメニュー→「Edit profile」→左側のメニューの中の「API Key」

  5. アップロードコマンド

./gradlew clean build bintrayUpload -PbintrayUser=nozaki -PbintrayKey=[APIキー] -PdryRun=false
  1. jCenterに登録 Bintrayの画面で登録ボタンを押す

アップロードコマンドに失敗するとき

ビルドに失敗した場合 kotlinがないとか言われたとき
javaのpathが、sdkの方に通ってないから。sdkの方にパスを通す
参照:Android開発環境でコマンドラインからのビルドが失敗する場合の対処

参照

https://github.com/novoda/bintray-release (公式)
https://qiita.com/Nabesuke/items/06bc67b6667483a97030
https://qiita.com/gupuru/items/aa81f007d306fc6c4a2c

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0