Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-55156 - update build-css task to account for common css being migrated to osgi module #4

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
48 changes: 45 additions & 3 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,48 @@ Error-Prone was automatically installed. Please rerun your task.
<fileset dir="${sdk.dir}/dependencies/com.liferay.css.builder/lib" includes="*.jar" />
</path>

<if>
<resourcecount count="1" when="ne">
<fileset dir="${module.framework.base.dir}/portal" includes="com.liferay.frontend.common.css*.jar" />
</resourcecount>
<then>
<ant dir="${lp.portal.project.dir}/modules/frontend/frontend-common-css" target="deploy" inheritAll="false" />
</then>
</if>

<property name="frontend.common.css.tmp.dir" value="${sdk.dir}/tmp/com.liferay.frontend.common.css" />

<pathconvert property="frontend.common.css.jar.path">
<path>
<fileset dir="${module.framework.base.dir}/portal" includes="com.liferay.frontend.common.css*.jar" />
</path>
</pathconvert>

<basename file="${frontend.common.css.jar.path}" property="frontend.common.css.file" />

<if>
<not>
<uptodate
srcfile="${module.framework.base.dir}/portal/${frontend.common.css.file}"
targetfile="${frontend.common.css.tmp.dir}"
/>
</not>
<then>
<delete dir="${frontend.common.css.tmp.dir}" />

<mkdir dir="${frontend.common.css.tmp.dir}" />

<unzip
dest="${frontend.common.css.tmp.dir}"
src="${frontend.common.css.jar.path}"
>
<mapper>
<globmapper from="META-INF/resources/html/*" to="html/*" />
</mapper>
</unzip>
</then>
</if>

<java
classname="com.liferay.css.builder.CSSBuilder"
classpathref="css.builder.classpath"
Expand All @@ -188,7 +230,7 @@ Error-Prone was automatically installed. Please rerun your task.
<arg value="sass.compiler.class.name=${sass.compiler.class.name}" />
<arg value="sass.dir=/" />
<arg value="sass.docroot.dir=@{sass.docroot.dir}" />
<arg value="sass.portal.common.dir=${app.server.portal.dir}/html/css/common" />
<arg value="sass.portal.common.dir=${frontend.common.css.tmp.dir}/html/css/common" />
</java>

<if>
Expand Down Expand Up @@ -1951,7 +1993,7 @@ Please find a solution that does not require portal-impl.jar.
<then>
<if>
<resourcecount count="0" when="gt">
<fileset dir="@{module.dir}/docroot" erroronmissingdir="false" includes="**/*.css" />
<fileset dir="@{module.dir}/docroot" erroronmissingdir="false" includes="**/*.css, **/*.scss" />
</resourcecount>
<then>
<build-css
Expand All @@ -1963,7 +2005,7 @@ Please find a solution that does not require portal-impl.jar.

<if>
<resourcecount count="0" when="gt">
<fileset dir="@{module.dir}/src/META-INF/resources" erroronmissingdir="false" includes="**/*.css" />
<fileset dir="@{module.dir}/src/META-INF/resources" erroronmissingdir="false" includes="**/*.css, **/*.scss" />
</resourcecount>
<then>
<build-css
Expand Down
10 changes: 0 additions & 10 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -556,16 +556,6 @@
sonatype.snapshot.url=https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce
sonatype.snapshot.username=

##
## Spring Extender
##

#
# The time in seconds to wait for mandatory dependencies to be satisfied
# before failing the creation of an application context.
#
spring.extender.time.to.wait=600

##
## Transpile
##
Expand Down
2 changes: 1 addition & 1 deletion dependencies/com.liferay.javadoc.formatter/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</info>

<dependencies defaultconf="default">
<dependency name="com.liferay.javadoc.formatter" org="com.liferay" rev="1.0.3" />
<dependency name="com.liferay.javadoc.formatter" org="com.liferay" rev="1.0.4" />
</dependencies>
</ivy-module>
2 changes: 1 addition & 1 deletion dependencies/com.liferay.javadoc.formatter/ivy.xml.MD5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4c71169ec682e0649c212baa21ed5623
a8af9eaf6cbe9b7e677a7ed82ee7aa3b
Binary file modified dependencies/com.liferay.javadoc.formatter/lib/ant-launcher.jar
Binary file not shown.
Binary file modified dependencies/com.liferay.javadoc.formatter/lib/ant.jar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</info>

<dependencies defaultconf="default">
<dependency name="com.liferay.portal.tools.service.builder" org="com.liferay" rev="1.0.21" />
<dependency name="com.liferay.portal.tools.service.builder" org="com.liferay" rev="1.0.23" />
</dependencies>
</ivy-module>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a18697b6214f93f75356b4f27e53859c
01e374cdbe1cc2be096810834eb9d88f
Binary file not shown.
2 changes: 1 addition & 1 deletion dependencies/com.liferay.portal.tools.wsdd.builder/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</info>

<dependencies defaultconf="default">
<dependency name="com.liferay.portal.tools.wsdd.builder" org="com.liferay" rev="1.0.1" />
<dependency name="com.liferay.portal.tools.wsdd.builder" org="com.liferay" rev="1.0.2" />
</dependencies>
</ivy-module>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e1939248871eaf1cea5f4cfeb17d1ce4
ef10ce26b5e886cb3a65a0bbba780787
Binary file not shown.
2 changes: 1 addition & 1 deletion dependencies/com.liferay.source.formatter/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</info>

<dependencies defaultconf="default">
<dependency name="com.liferay.source.formatter" org="com.liferay" rev="1.0.34" />
<dependency name="com.liferay.source.formatter" org="com.liferay" rev="1.0.36" />
</dependencies>
</ivy-module>
2 changes: 1 addition & 1 deletion dependencies/com.liferay.source.formatter/ivy.xml.MD5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d71259ed517cf16f87552d001aa2158
018726be6cdbb4767bf3e8ed6ac1bb5c
Binary file not shown.
Binary file modified webs/sync-web/docroot/WEB-INF/lib/sync-web-service.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,29 @@
public class SyncDLObjectUpdate {

public SyncDLObjectUpdate(
List<SyncDLObject> syncDLObjects, long lastAccessTime) {
List<SyncDLObject> syncDLObjects, int resultsTotal,
long lastAccessTime) {

_syncDLObjects = syncDLObjects;
_resultsTotal = resultsTotal;
_lastAccessTime = lastAccessTime;
}

public long getLastAccessTime() {
return _lastAccessTime;
}

public int getResultsTotal() {
return _resultsTotal;
}

@JSON
public List<SyncDLObject> getSyncDLObjects() {
return _syncDLObjects;
}

private long _lastAccessTime;
private int _resultsTotal;
private List<SyncDLObject> _syncDLObjects;

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
@ProviderType
public interface SyncDLObjectFinder {
public java.util.List<java.lang.Long> filterFindByC_R_U_T(long companyId,
long groupId, long userId, long[] typePKs)
throws com.liferay.portal.kernel.exception.SystemException;
long groupId, long userId, long[] typePKs);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
@ProviderType
public class SyncDLObjectFinderUtil {
public static java.util.List<java.lang.Long> filterFindByC_R_U_T(
long companyId, long groupId, long userId, long[] typePKs)
throws com.liferay.portal.kernel.exception.SystemException {
long companyId, long groupId, long userId, long[] typePKs) {
return getFinder()
.filterFindByC_R_U_T(companyId, groupId, userId, typePKs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void doFilter(
syncClientMinBuild = _ABSOLUTE_MINIMUM_BUILD;
}

if ((build == -1) || (build >= syncClientMinBuild)) {
if (build >= syncClientMinBuild) {
filterChain.doFilter(servletRequest, servletResponse);

return;
Expand Down Expand Up @@ -114,6 +114,6 @@ public void doFilter(
public void init(FilterConfig filterConfig) {
}

private static final int _ABSOLUTE_MINIMUM_BUILD = 3000;
private static final int _ABSOLUTE_MINIMUM_BUILD = 3009;

}
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ public SyncDLObjectUpdate getAllSyncDLObjects(
List<SyncDLObject> syncDLObjects =
syncDLObjectPersistence.findByC_M_R(companyId, 0, repositoryId);

return new SyncDLObjectUpdate(syncDLObjects, lastAccessTime);
return new SyncDLObjectUpdate(
syncDLObjects, syncDLObjects.size(), lastAccessTime);
}
catch (PortalException pe) {
throw new PortalException(SyncUtil.buildExceptionMessage(pe), pe);
Expand Down Expand Up @@ -602,15 +603,18 @@ public SyncDLObjectUpdate getSyncDLObjectUpdate(
new SyncDLObjectModifiedTimeComparator());

if (syncDLObjects.isEmpty()) {
return new SyncDLObjectUpdate(syncDLObjects, lastAccessTime);
return new SyncDLObjectUpdate(syncDLObjects, 0, lastAccessTime);
}

int count = syncDLObjectPersistence.countByC_M_R_NotE(
companyId, lastAccessTime, repositoryId, events);

SyncDLObject syncDLObject = syncDLObjects.get(
syncDLObjects.size() - 1);

return new SyncDLObjectUpdate(
checkSyncDLObjects(syncDLObjects, companyId, repositoryId),
syncDLObject.getModifiedTime());
count, syncDLObject.getModifiedTime());
}
catch (PortalException pe) {
throw new PortalException(SyncUtil.buildExceptionMessage(pe), pe);
Expand Down Expand Up @@ -651,7 +655,8 @@ public SyncDLObjectUpdate getSyncDLObjectUpdate(
syncDLObjects, companyId, repositoryId, parentFolderId,
lastAccessTime);

return new SyncDLObjectUpdate(syncDLObjects, lastAccessTime);
return new SyncDLObjectUpdate(
syncDLObjects, syncDLObjects.size(), lastAccessTime);
}
catch (PortalException pe) {
throw new PortalException(SyncUtil.buildExceptionMessage(pe), pe);
Expand Down
4 changes: 2 additions & 2 deletions webs/sync-web/docroot/WEB-INF/src/portlet.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ sync.client.max.connections=1

#
# Set the minimum required build number for clients. This value must be greater
# or equal to the hard coded value of 3000.
# or equal to the hard coded value of 3009.
#
# Note that the four digit build number corresponds to the version in the
# following manner: build #### corresponds to version #.#.##. For example, build
# 3010 corresponds to version 3.0.10, and build 3104 corresponds to version
# 3.1.4.
#
sync.client.min.build=3000
sync.client.min.build=3009

#
# Set the interval in seconds for how often clients will poll the server for
Expand Down