Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 0b277e3

Browse files
author
Clément Le Provost
committed
[doc] Added a note on the Pegdown Doclet plugin problem
[ci skip]
1 parent 6ec75d3 commit 0b277e3

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

doc/build.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The client exists in two different flavors:
99

1010
- The **online** flavor, which is the regular API client. Its source code is located under the `algoliasearch/src/main` directory. It gets published to Maven Central as `algoliasearch-android`.
1111

12-
- The **offline** flavor, which is a superset of the online flavor. In addition to the main source code, it adds the `algoliasearch/src/offline` directory. It gets published to Maven Central as `algoliasearch-offline-android`. This flavor has a dependency on the Algolia Search Offline Core module (`algoliasearch-offline-core-android` in Maven).
12+
- The **offline** flavor, which is a superset of the online flavor. In addition to the main source code, it adds the `algoliasearch/src/offline` directory. It gets published to Maven Central as `algoliasearch-offline-android`. This flavor has a dependency on the Algolia Search Offline Core module (`algoliasearch-offline-core-android` in Maven).
1313

1414

1515
## Problem
@@ -35,3 +35,23 @@ Consequently, the approach taken is as follows:
3535

3636
- Then use Gradle as you would with a normal module.
3737

38+
39+
# Build-time dependencies
40+
41+
We rely on the [Pegdown Doclet](https://github.com/Abnaxos/pegdown-doclet) to generate our reference documentation ("Javadoc"). This is a built-time dependency that does not impact pre-built binaries.
42+
43+
However, when targeting the source version of the API Client (e.g. when developing or debugging), this dependency bubbles up to the dependent project. After literally hours of searching the Internet, I found no way to persuade Gradle to automatically draw this dependency. All normal tricks (like using `compileOnly`, `provided` or `classpath`) failed miserably. Therefore, you have to put this in the *top-level* `build.gradle` from the dependent project:
44+
45+
```
46+
buildscript {
47+
// [...]
48+
dependencies {
49+
// [...]
50+
classpath 'ch.raffael.pegdown-doclet:pegdown-doclet:1.3' // FIXME: DO NOT COMMIT
51+
}
52+
}
53+
```
54+
55+
An alternative is just to comment out the line referring to the plugin in the API Client's `common.gradle`.
56+
57+
**Warning:** In either case, please make sure not to commit those changes!

0 commit comments

Comments
 (0)