GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — objectbox-java/objectbox-java/build.gradle at main · MDShahJalalxgithub/objectbox-java

Expand file tree

/

build.gradle

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
154 lines (129 loc) · 5.26 KB
/

build.gradle

Copy path

File metadata and controls

154 lines (129 loc) · 5.26 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
plugins {
id("java-library")
id("objectbox-publish")
id("com.github.spotbugs")
}
// Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
tasks.withType(JavaCompile).configureEach {
options.release.set(8)
}
ext {
javadocForWebDir = "$buildDir/docs/web-api-docs"
}
dependencies {
api project(':objectbox-java-api')
implementation "org.greenrobot:essentials:$essentialsVersion"
api 'com.google.code.findbugs:jsr305:3.0.2'
// https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.7.3'
}
spotbugs {
ignoreFailures = true
showStackTraces = true
excludeFilter = file("spotbugs-exclude.xml")
}
tasks.spotbugsMain {
reports.create("html") {
required.set(true)
}
}
javadoc {
// Hide internal API from javadoc artifact.
exclude("**/io/objectbox/Cursor.java")
exclude("**/io/objectbox/KeyValueCursor.java")
exclude("**/io/objectbox/ModelBuilder.java")
exclude("**/io/objectbox/Properties.java")
exclude("**/io/objectbox/Transaction.java")
exclude("**/io/objectbox/model/**")
exclude("**/io/objectbox/ideasonly/**")
exclude("**/io/objectbox/internal/**")
exclude("**/io/objectbox/reactive/DataPublisherUtils.java")
exclude("**/io/objectbox/reactive/WeakDataObserver.java")
}
// Note: use packageJavadocForWeb to get as ZIP.
tasks.register('javadocForWeb', Javadoc) {
group = 'documentation'
description = 'Builds Javadoc incl. objectbox-java-api classes with web tweaks.'
javadocTool = javaToolchains.javadocToolFor {
// Note: the style changes only work if using JDK 10+, 11 is latest LTS.
languageVersion = JavaLanguageVersion.of(11)
}
def srcApi = project(':objectbox-java-api').file('src/main/java/')
if (!srcApi.directory) throw new GradleScriptException("Not a directory: ${srcApi}", null)
// Hide internal API from javadoc artifact.
def filteredSources = sourceSets.main.allJava.matching {
exclude("**/io/objectbox/Cursor.java")
exclude("**/io/objectbox/KeyValueCursor.java")
exclude("**/io/objectbox/ModelBuilder.java")
exclude("**/io/objectbox/Properties.java")
exclude("**/io/objectbox/Transaction.java")
exclude("**/io/objectbox/flatbuffers/**")
exclude("**/io/objectbox/ideasonly/**")
exclude("**/io/objectbox/internal/**")
exclude("**/io/objectbox/model/**")
exclude("**/io/objectbox/reactive/DataPublisherUtils.java")
exclude("**/io/objectbox/reactive/WeakDataObserver.java")
}
source = filteredSources + srcApi
classpath = sourceSets.main.output + sourceSets.main.compileClasspath
destinationDir = file(javadocForWebDir)
title = "ObjectBox Java ${version} API"
options.overview = "$projectDir/src/web/overview.html"
options.bottom = 'Available under the Apache License, Version 2.0 - <i>Copyright &#169; 2017-2024 <a href="https://objectbox.io/">ObjectBox Ltd</a>. All Rights Reserved.</i>'
doLast {
// Note: frequently check the vanilla stylesheet.css if values still match.
def stylesheetPath = "$destinationDir/stylesheet.css"
// Primary background
ant.replace(file: stylesheetPath, token: "#4D7A97", value: "#17A6A6")
// "Active" background
ant.replace(file: stylesheetPath, token: "#F8981D", value: "#7DDC7D")
// Hover
ant.replace(file: stylesheetPath, token: "#bb7a2a", value: "#E61955")
// Note: in CSS stylesheets the last added rule wins, so append to default stylesheet.
// Code blocks
file(stylesheetPath).append("pre {\nwhite-space: normal;\noverflow-x: auto;\n}\n")
// Member summary tables
file(stylesheetPath).append(".memberSummary {\noverflow: auto;\n}\n")
// Descriptions and signatures
file(stylesheetPath).append(".block {\n" +
" display:block;\n" +
" margin:3px 10px 2px 0px;\n" +
" color:#474747;\n" +
" overflow:auto;\n" +
"}")
println "Javadoc for web created at $destinationDir"
}
}
tasks.register('packageJavadocForWeb', Zip) {
dependsOn javadocForWeb
group = 'documentation'
description = 'Packages Javadoc incl. objectbox-java-api classes with web tweaks as ZIP.'
archiveFileName = "objectbox-java-web-api-docs.zip"
destinationDirectory = file("$buildDir/dist")
from file(javadocForWebDir)
doLast {
println "Javadoc for web packaged to ${file("$buildDir/dist/objectbox-java-web-api-docs.zip")}"
}
}
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from 'build/docs/javadoc'
}
tasks.register('sourcesJar', Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
// Set project-specific properties.
publishing.publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'ObjectBox Java (only)'
description = 'ObjectBox is a fast NoSQL database for Objects'
}
}
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.