Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
2,701 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,42 @@ | ||
To update to a new version of Lucene: | ||
|
||
1. Change the version number in the following files: | ||
|
||
build.gradle | ||
apps/samples/.classpath | ||
apps/samples/Ensemble8/build.gradle | ||
apps/samples/Ensemble8/legal/lucene.md | ||
apps/samples/Ensemble8/nbproject/project.properties | ||
build.gradle | ||
|
||
2. Update the Gradle dependency verification file | ||
(gradle/verification-metadata.xml): | ||
|
||
$ gradle --write-verification-metadata sha256 help | ||
|
||
2. Do a clean build of apps: | ||
Edit the file to remove the old Lucene dependencies and run the | ||
command again to test your changes. For alternative ways to update | ||
the file, see "Cleaning up the verification file" on the page: | ||
|
||
gradle clean | ||
gradle sdk apps | ||
Verifying dependencies - Gradle User Guide | ||
https://docs.gradle.org/current/userguide/dependency_verification.html | ||
|
||
NOTE: if upgrading to a new major version there are usually compilation or runtime errors that need to be fixed. | ||
3. Do a clean build of apps: | ||
|
||
$ gradle clean | ||
$ gradle sdk apps | ||
|
||
3. Regenerate the index files. This step can be skipped if only the "bugfix" number (the third digit) of the release changes: | ||
NOTE: If upgrading to a new major version, there are usually | ||
compilation or runtime errors that need to be fixed. | ||
|
||
$ cd apps/samples/Ensemble8 | ||
$ rm -rf src/generated/resources/ensemble/search/index | ||
$ ant -Dplatforms.JDK_1.9.home=$JAVA_HOME clean ensemble-generate-search-index jar | ||
$ rm src/generated/resources/ensemble/search/index/write.lock | ||
$ git add --all src/generated/resources/ensemble/search/index | ||
4. Regenerate the index files. This step can be skipped if only the | ||
"bugfix" number (the third digit) of the release changes: | ||
|
||
$ cd apps/samples/Ensemble8 | ||
$ rm -r src/generated/resources/ensemble/search/index | ||
$ ant -Dplatforms.JDK_1.9.home=$JAVA_HOME \ | ||
clean ensemble-generate-search-index jar | ||
$ rm src/generated/resources/ensemble/search/index/write.lock | ||
$ git add --all src/generated/resources/ensemble/search/index | ||
|
||
4. Test it by running Ensemble and entering text into the search box (upper right) | ||
5. Test it by running Ensemble and entering text into the search box | ||
(upper right). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
For more information on the Gradle dependency verification file | ||
(verification-metadata.xml), see the following page: | ||
|
||
Verifying dependencies - Gradle User Guide | ||
https://docs.gradle.org/current/userguide/dependency_verification.html | ||
|
||
Recreate the dependency verification file as follows: | ||
|
||
1. Remove the existing file on Linux. | ||
|
||
$ rm gradle/verification-metadata.xml | ||
|
||
2. Run the following command on Linux. | ||
|
||
$ gradle -PCOMPILE_WEBKIT=true -PBUILD_LIBAV_STUBS=true \ | ||
--write-verification-metadata sha256 help | ||
|
||
3. Copy the file on Linux to macOS and run the command again to pick up | ||
the 'org.eclipse.swt.cocoa.macosx.x86_64' library. | ||
|
||
4. Copy the file on macOS to Windows and run the command again to pick | ||
up the 'org.eclipse.swt.win32.win32.x86_64' library. Convert the | ||
newline format of the file back to single-character line feeds. | ||
|
||
$ dos2unix gradle/verification-metadata.xml | ||
dos2unix: converting file gradle/verification-metadata.xml to Unix format... | ||
|
||
$ file gradle/verification-metadata.xml | ||
gradle/verification-metadata.xml: XML 1.0 document, ASCII text | ||
|
||
5. Use the file generated on Linux, macOS, and Windows in the Oracle | ||
builds to pick up the internal tools and development kits in the | ||
'javafx' component group. | ||
|
||
6. Commit the final version of the file to the repository. | ||
|
||
These commands will cause Gradle to compute the requested checksums | ||
directly from the newly downloaded artifacts and add them to the file. | ||
|
||
Optionally verify that the new checksums added to the file are correct. | ||
The User Guide states, "However, if a dependency is compromised in | ||
a repository, it's likely its checksum will be too, so it's a good | ||
practice to get the checksum from a different place, usually the | ||
website of the library itself." Even without this extra verification, | ||
having the checksums in the default build allows for a distributed | ||
consensus on their correct values and will report any discrepancies. | ||
|
||
When upgrading an external dependency to a newer version, update the | ||
dependency verification file in a similar manner. Edit the file to | ||
remove the older dependencies no longer in use and run the commands | ||
again to test your changes. For alternative ways to update the file, | ||
see "Cleaning up the verification file" at the link above. |
Oops, something went wrong.