Skip to content

Commit 3a5436e

Browse files
Merge branch '28-javadocs-for-mobile' into 'dev'
Resolve "Improve Javadocs for mobile screens" See merge request objectbox/objectbox-java!36
2 parents 517e46c + e383e75 commit 3a5436e

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

objectbox-java-api/build.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ sourceCompatibility = 1.7
77

88
javadoc {
99
failOnError = false
10-
title = " ObjectBox API ${version} API"
10+
title = "ObjectBox API ${version} API"
1111
options.bottom = 'Available under the Apache License, Version 2.0 - <i>Copyright &#169; 2017-2019 <a href="http://objectbox.io/">ObjectBox Ltd</a>. All Rights Reserved.</i>'
12-
doLast {
13-
copy {
14-
from '../javadoc-style'
15-
into "build/docs/javadoc/"
16-
}
17-
}
1812
}
1913

2014
task javadocJar(type: Jar, dependsOn: javadoc) {

objectbox-java/build.gradle

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424

2525
javadoc {
2626
failOnError = false
27-
title = " ObjectBox Java ${version} API"
27+
title = "ObjectBox Java ${version} API"
2828
options.bottom = 'Available under the Apache License, Version 2.0 - <i>Copyright &#169; 2017-2019 <a href="http://objectbox.io/">ObjectBox Ltd</a>. All Rights Reserved.</i>'
2929
exclude("**/com/google/**")
3030
exclude("**/io/objectbox/Cursor.java")
@@ -41,14 +41,30 @@ javadoc {
4141
if (!srcApi.directory) throw new GradleScriptException("Not a directory: ${srcApi}", null)
4242
source += srcApi
4343
doLast {
44+
// Note: frequently check the vanilla stylesheet.css if values still match.
45+
def stylesheetPath = "$buildDir/docs/javadoc/stylesheet.css"
46+
4447
// Primary background
45-
ant.replace(file: "build/docs/javadoc/stylesheet.css", token: "background-color:#4D7A97", value: "background-color:#17A6A6")
48+
ant.replace(file: stylesheetPath, token: "#4D7A97", value: "#17A6A6")
4649

4750
// "Active" background
48-
ant.replace(file: "build/docs/javadoc/stylesheet.css", token: "background-color:#F8981D", value: "background-color:#7DDC7D")
51+
ant.replace(file: stylesheetPath, token: "#F8981D", value: "#7DDC7D")
4952

5053
// Hover
51-
ant.replace(file: "build/docs/javadoc/stylesheet.css", token: "color:#bb7a2a", value: "color:#E61955")
54+
ant.replace(file: stylesheetPath, token: "#bb7a2a", value: "#E61955")
55+
56+
// Note: in CSS stylesheets the last added rule wins, so append to default stylesheet.
57+
// Code blocks
58+
file(stylesheetPath).append("pre {\nwhite-space: normal;\noverflow-x: auto;\n}\n")
59+
// Member summary tables
60+
file(stylesheetPath).append(".memberSummary {\noverflow: auto;\n}\n")
61+
// Descriptions and signatures
62+
file(stylesheetPath).append(".block {\n" +
63+
" display:block;\n" +
64+
" margin:3px 10px 2px 0px;\n" +
65+
" color:#474747;\n" +
66+
" overflow:auto;\n" +
67+
"}")
5268
}
5369
}
5470

objectbox-rxjava/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ javadoc {
1818
title = "ObjectBox RxJava2 ${version} API"
1919
excludes = [] // Unfinished APIs if any
2020
options.bottom = 'Available under the Apache License, Version 2.0 - <i>Copyright &#169; 2018-2019 <a href="http://objectbox.io/">ObjectBox Ltd</a>. All Rights Reserved.</i>'
21-
doLast {
22-
copy {
23-
from '../javadoc-style/'
24-
into "build/docs/javadoc/"
25-
}
26-
}
2721
}
2822

2923
task javadocJar(type: Jar, dependsOn: javadoc) {

0 commit comments

Comments
 (0)