mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-22324 Mavenization, resolve some of the release tasks
This commit is contained in:
parent
2f7090256a
commit
9be9ed3231
8 changed files with 178 additions and 7 deletions
|
@ -2180,7 +2180,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
return (stamp[field] > UNSET) ? fields[field] : defaultValue;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
* Use this function instead of internalGet(MONTH). The implementation
|
||||
|
@ -2189,6 +2189,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* to MONTH correctly if ORDINAL_MONTH has higher priority.
|
||||
* @return the value for the given time field.
|
||||
*/
|
||||
@Deprecated
|
||||
protected int internalGetMonth()
|
||||
{
|
||||
if (resolveFields(MONTH_PRECEDENCE) == MONTH) {
|
||||
|
|
|
@ -1140,7 +1140,9 @@ public class ChineseCalendar extends Calendar {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
@Deprecated
|
||||
protected int internalGetMonth()
|
||||
{
|
||||
if (resolveFields(MONTH_PRECEDENCE) == MONTH) {
|
||||
|
@ -1161,7 +1163,9 @@ public class ChineseCalendar extends Calendar {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
@Deprecated
|
||||
protected int internalGetMonth(int defaultValue)
|
||||
{
|
||||
if (resolveFields(MONTH_PRECEDENCE) == MONTH) {
|
||||
|
|
|
@ -966,7 +966,9 @@ public class HebrewCalendar extends Calendar {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
@Deprecated
|
||||
protected int internalGetMonth()
|
||||
{
|
||||
if (resolveFields(MONTH_PRECEDENCE) == ORDINAL_MONTH) {
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
classpath is to be used instead.
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
|
@ -125,9 +124,7 @@
|
|||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
<icu4j.api.doc.copyright.footer><font size=-1>Copyright © 2016 Unicode, Inc. and others.</font></icu4j.api.doc.copyright.footer>
|
||||
<!-- Needs to be overriden in sub-modules -->
|
||||
<icu4j.api.doc.root.dir>${project.basedir}</icu4j.api.doc.root.dir>
|
||||
<icu4j.api.report.version>74</icu4j.api.report.version>
|
||||
|
||||
<!-- Used for the .jar Manifest files -->
|
||||
|
||||
|
@ -170,15 +171,17 @@
|
|||
<taglets>
|
||||
<taglet>
|
||||
<tagletClass>com.ibm.icu.dev.tool.docs.ICUTaglet</tagletClass>
|
||||
<!-- We can use `tagletArtifact` instead of `tagletpath`,
|
||||
but then we must `mvn install` the `tools_build` artifact. -->
|
||||
<tagletpath>${icu4j.api.doc.root.dir}/tools/build/target/classes</tagletpath>
|
||||
</taglet>
|
||||
<taglet>
|
||||
<tagletClass>ch.arrenbrecht.jcite.JCiteTaglet</tagletClass>
|
||||
</taglet>
|
||||
</taglets>
|
||||
<tagletArtifacts>
|
||||
<tagletArtifact>
|
||||
<groupId>com.ibm.icu</groupId>
|
||||
<artifactId>tools_build</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</tagletArtifact>
|
||||
<tagletArtifact>
|
||||
<groupId>org.mcraig</groupId>
|
||||
<artifactId>jcite</artifactId>
|
||||
|
@ -328,6 +331,59 @@
|
|||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- This is used to gather API data used to generate API reports
|
||||
(regular, draft, deprecated, status consistency, etc.)
|
||||
To run it:
|
||||
mvn install -DskipITs -DskipTests
|
||||
mvn site -DskipITs -DskipTests -P gatherapi
|
||||
-->
|
||||
<profile>
|
||||
<id>gatherapi</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>aggregate</id>
|
||||
<phase>site</phase>
|
||||
<goals>
|
||||
<goal>aggregate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!-- For incomplete doc tags javadoc fails with:
|
||||
```
|
||||
Error while creating javadoc report:
|
||||
Exit code: 1
|
||||
Command line was: ...
|
||||
Refer to the generated Javadoc files in '...' dir.
|
||||
```
|
||||
But in most cases these are not related to what we do here, which is API reporting.
|
||||
We ignore them so that we can progess with what we really care.
|
||||
-->
|
||||
<failOnError>false</failOnError>
|
||||
<useStandardDocletOptions>false</useStandardDocletOptions>
|
||||
<doclet>com.ibm.icu.dev.tool.docs.GatherAPIData</doclet>
|
||||
<docletArtifact>
|
||||
<groupId>com.ibm.icu</groupId>
|
||||
<artifactId>tools_build</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</docletArtifact>
|
||||
<additionalOptions>
|
||||
<additionalOption>-name 'ICU4J ${mf.Implementation-Version}'</additionalOption>
|
||||
<additionalOption>-output ${project.build.directory}/icu4j${icu4j.api.report.version}.api3</additionalOption>
|
||||
<additionalOption>-internal</additionalOption>
|
||||
<additionalOption>-version</additionalOption>
|
||||
<additionalOption>-gzip</additionalOption>
|
||||
</additionalOptions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- The tools/build module depends on the old tools.jar (jdk 1.8)
|
||||
The com.sun.javadoc package was deprecated in Java 11, and has been removed for Java 17.
|
||||
JDK 11 does not include tools.jar anymore. The code must be updated, see migration guide at
|
||||
|
|
90
icu4j/releases_tools/api_reports.sh
Executable file
90
icu4j/releases_tools/api_reports.sh
Executable file
|
@ -0,0 +1,90 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 and later: Unicode, Inc. and others.
|
||||
# License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
export MAVEN_ARGS='--no-transfer-progress'
|
||||
|
||||
export artifact_version='74.0.1-SNAPSHOT'
|
||||
export api_report_version='74'
|
||||
export api_report_prev_version='73'
|
||||
export out_dir=target
|
||||
|
||||
function copyArtifacts() {
|
||||
rm -fr ${out_dir}/lib/
|
||||
mkdir -p ${out_dir}/lib/
|
||||
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:tools_build:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:core:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:collate:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:icu4j-charset:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:currdata:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:langdata:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:regiondata:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
mvn dependency:copy -q -Dartifact=com.ibm.icu:translit:${artifact_version} -DoutputDirectory=${out_dir}/lib/
|
||||
}
|
||||
|
||||
function reportTitle() {
|
||||
echo "=============================================="
|
||||
echo $*
|
||||
echo "=============================================="
|
||||
}
|
||||
|
||||
# Build everything
|
||||
mvn install -DskipITs -DskipTests
|
||||
# Gather API info
|
||||
mvn site -q -DskipITs -DskipTests -P gatherapi
|
||||
|
||||
copyArtifacts
|
||||
|
||||
export toolcp=${out_dir}/lib/collate-74.0.1-SNAPSHOT.jar:${out_dir}/lib/core-74.0.1-SNAPSHOT.jar:${out_dir}/lib/currdata-74.0.1-SNAPSHOT.jar:${out_dir}/lib/icu4j-charset-74.0.1-SNAPSHOT.jar:${out_dir}/lib/langdata-74.0.1-SNAPSHOT.jar:${out_dir}/lib/regiondata-74.0.1-SNAPSHOT.jar:${out_dir}/lib/tools_build-74.0.1-SNAPSHOT.jar:${out_dir}/lib/translit-74.0.1-SNAPSHOT.jar
|
||||
|
||||
# ====================================================================================
|
||||
|
||||
reportTitle apireport :: Run API report generator tool
|
||||
|
||||
java -cp $toolcp \
|
||||
com.ibm.icu.dev.tool.docs.ReportAPI \
|
||||
-old: tools/build/icu4j${api_report_prev_version}.api3.gz \
|
||||
-new: ${out_dir}/icu4j${api_report_version}.api3.gz \
|
||||
-html \
|
||||
-out: ${out_dir}/icu4j_compare_${api_report_prev_version}_${api_report_version}.html
|
||||
|
||||
# ====================================================================================
|
||||
|
||||
reportTitle checkDeprecated :: Check consistency between javadoc @deprecated and @Deprecated annotation
|
||||
|
||||
java -cp $toolcp \
|
||||
com.ibm.icu.dev.tool.docs.DeprecatedAPIChecker \
|
||||
${out_dir}/icu4j${api_report_version}.api3.gz
|
||||
|
||||
# ====================================================================================
|
||||
|
||||
reportTitle checkAPIStatusConsistency :: Check consistency between API class status and methods overriding java.lang.Object
|
||||
|
||||
# If you need classes excluded from this check, define following property in build-local.properties.
|
||||
# e.g. checkAPIStatusConsistency.skip.classes=com.ibm.icu.text.Normalizer;com.ibm.icu.util.ULocale
|
||||
|
||||
java -cp $toolcp \
|
||||
com.ibm.icu.dev.tool.docs.APIStatusConsistencyChecker \
|
||||
${out_dir}/icu4j${api_report_version}.api3.gz \
|
||||
checkAPIStatusConsistency.skip.classes=
|
||||
|
||||
# ====================================================================================
|
||||
|
||||
reportTitle draftAPIs :: Run API collector tool and generate draft API report in html
|
||||
|
||||
java -cp $toolcp \
|
||||
com.ibm.icu.dev.tool.docs.CollectAPI \
|
||||
-f Draft \
|
||||
-o ${out_dir}/draftAPIs.html \
|
||||
${out_dir}/icu4j${api_report_version}.api3.gz
|
||||
|
||||
# ====================================================================================
|
||||
|
||||
reportTitle draftAPIsTSV :: Run API collector tool and generate draft API report in TSV
|
||||
|
||||
java -cp $toolcp \
|
||||
com.ibm.icu.dev.tool.docs.CollectAPI \
|
||||
-f Draft \
|
||||
-o ${out_dir}/draftAPIs.tsv \
|
||||
-t ${out_dir}/icu4j${api_report_version}.api3.gz
|
20
icu4j/releases_tools/cheatsheet.txt
Normal file
20
icu4j/releases_tools/cheatsheet.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Copyright (C) 2023 and later: Unicode, Inc. and others.
|
||||
# License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
====
|
||||
|
||||
Build all artifacts, with sources and javadoc, ready to deploy
|
||||
|
||||
mvn site -DskipITs -DskipTests -P with_sources,with_javadoc
|
||||
|
||||
====
|
||||
|
||||
Build the unified javadoc (public site), combining the javadocs from all public artifacts.
|
||||
|
||||
mvn site -DskipITs -DskipTests -P with_full_javadoc
|
||||
|
||||
====
|
||||
|
||||
Run API reports
|
||||
|
||||
api_reports.sh
|
|
@ -584,6 +584,7 @@ pre.java /* container for citations */
|
|||
border-width: 1px;
|
||||
border-color: DarkGray;
|
||||
margin: 1.5em 1.5em 1.5em 1.5em;
|
||||
padding: 1em;
|
||||
background-color: cornsilk;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue