Build.gradle for git submodule

The source tree is as follows:

core               // root
  .gitmodules     // this has box-sdk as submodule
  box-sdk          // git submodule
     BoxJavaLibraryV2     // Box related files

I also created settings.gradle

include 'box-sdk:BoxJavaLibraryV2'

My build.gradle

compile project(':box-sdk:BoxJavaLibraryV2')

At this point, I was able to compile and build a root project with a field as a dependency.

The problem started when I tried to check and check the whole project again. I have done the following:

I managed to check .gitmodulesand box-sdk directory. But I could not check BoxJavaLibraryV2.

It errored out saying BoxJavaLibraryV2 is a submodule

I checked the root again, where I get both .gitmodules and box-sdk (without BoxJavaLibraryV2)

Then, to create my project, I had to do it manually:

git submodule init
git submodule update
gradle war

What changes and where do I need to do to eliminate the initialization and update steps.

I'm looking for:

when I check git master, the whole project with submodules should be built usinggradle war

Please, help

+4
1

:

git submodule update --init --recursive

-, Gradle ( 2010 ) :
GRADLE -21:" git.

A git clone --recursive : .

: Gradle ( git gradle).

+4

Source: https://habr.com/ru/post/1523835/


All Articles