0
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

Organization

Gradleで任意のフォルダのプロジェクトを追加する

はじめに

React NativeのAndroidプロジェクトで変則的なフォルダ構成だったのでGradleでうまく扱う方法を紹介します。
サブフォルダや同じ階層のフォルダの場合はGradleでマルチプロジェクトで実現できます。

フォルダ構成

myapp/
  android/ ★rootプロジェクト
    build.gradle
    settings.gradle ★これを編集する
    app/ ★アプリプロジェクト
      build.gradle
library/
  android/ ★ライブラリプロジェクト
    build.gradle

設定

settings.gradle
include ':app'
// ここから追加
include ':library'
project(':library').projectDir = file('../../library/android')
// ここまで追加

参考サイト

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
0
Help us understand the problem. What are the problem?