Extensions GWT API: Align rule with package boundaries
Plugins need to be adapted to import the classes from the new client package. Change-Id: I9c3533410fbfceebcdf4d7d899513d14ea1f0f34
This commit is contained in:
committed by
David Pursehouse
parent
6f560ffbdd
commit
7a722f73fd
@@ -1,31 +1,19 @@
|
||||
SRC = 'src/main/java/com/google/gerrit/extensions/'
|
||||
SRCS = glob([SRC + '**/*.java'])
|
||||
|
||||
# TODO(davido): align this rule with package boundaries.
|
||||
# This would probably affect quite some plugins, though.
|
||||
CLIENT_SRCS = [SRC + n for n in [
|
||||
'api/projects/ProjectState.java',
|
||||
'common/ChangeStatus.java',
|
||||
'common/Comment.java',
|
||||
'common/InheritableBoolean.java',
|
||||
'common/ListChangesOption.java',
|
||||
'common/Side.java',
|
||||
'common/SubmitType.java',
|
||||
'common/Theme.java',
|
||||
'webui/GerritTopMenu.java',
|
||||
]]
|
||||
EXT_API_SRCS = glob([SRC + 'client/*.java'])
|
||||
|
||||
gwt_module(
|
||||
name = 'client',
|
||||
srcs = glob(CLIENT_SRCS),
|
||||
srcs = EXT_API_SRCS,
|
||||
gwt_xml = SRC + 'Extensions.gwt.xml',
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = 'client-lib',
|
||||
srcs = glob(CLIENT_SRCS),
|
||||
resources = glob(CLIENT_SRCS + [SRC + 'Extensions.gwt.xml']),
|
||||
srcs = EXT_API_SRCS,
|
||||
resources = EXT_API_SRCS + glob([SRC + 'Extensions.gwt.xml']),
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
|
||||
@@ -14,7 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<module>
|
||||
<source path='api' />
|
||||
<source path='common' />
|
||||
<source path='webui' />
|
||||
<source path='client' />
|
||||
</module>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
package com.google.gerrit.extensions.api.changes;
|
||||
|
||||
import com.google.gerrit.extensions.client.ListChangesOption;
|
||||
import com.google.gerrit.extensions.common.ChangeInfo;
|
||||
import com.google.gerrit.extensions.common.ListChangesOption;
|
||||
import com.google.gerrit.extensions.common.SuggestedReviewerInfo;
|
||||
import com.google.gerrit.extensions.restapi.NotImplementedException;
|
||||
import com.google.gerrit.extensions.restapi.RestApiException;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
package com.google.gerrit.extensions.api.changes;
|
||||
|
||||
import com.google.gerrit.extensions.client.ListChangesOption;
|
||||
import com.google.gerrit.extensions.common.ChangeInfo;
|
||||
import com.google.gerrit.extensions.common.ListChangesOption;
|
||||
import com.google.gerrit.extensions.restapi.NotImplementedException;
|
||||
import com.google.gerrit.extensions.restapi.RestApiException;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.extensions.api.changes;
|
||||
|
||||
import com.google.gerrit.extensions.common.Comment;
|
||||
import com.google.gerrit.extensions.client.Comment;
|
||||
|
||||
public class DraftInput extends Comment {
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.extensions.api.changes;
|
||||
|
||||
import com.google.gerrit.extensions.common.Comment;
|
||||
import com.google.gerrit.extensions.client.Comment;
|
||||
import com.google.gerrit.extensions.restapi.DefaultInput;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
package com.google.gerrit.extensions.api.projects;
|
||||
|
||||
import com.google.gerrit.extensions.common.InheritableBoolean;
|
||||
import com.google.gerrit.extensions.common.SubmitType;
|
||||
import com.google.gerrit.extensions.client.InheritableBoolean;
|
||||
import com.google.gerrit.extensions.client.SubmitType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
/* Current state within the basic workflow of the change **/
|
||||
public enum ChangeStatus {
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.webui;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
public enum GerritTopMenu {
|
||||
ALL, MY, DIFFERENCES, PROJECTS, PEOPLE, PLUGINS, DOCUMENTATION;
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
public enum InheritableBoolean {
|
||||
TRUE,
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.api.projects;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
public enum ProjectState {
|
||||
ACTIVE,
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
public enum Side {
|
||||
PARENT, REVISION
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
public enum SubmitType {
|
||||
FAST_FORWARD_ONLY,
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
package com.google.gerrit.extensions.client;
|
||||
|
||||
public enum Theme {
|
||||
// Light themes
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
|
||||
import com.google.gerrit.extensions.client.ChangeStatus;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
|
||||
import com.google.gerrit.extensions.client.Comment;
|
||||
|
||||
public class CommentInfo extends Comment {
|
||||
public AccountInfo author;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
|
||||
import com.google.gerrit.extensions.client.SubmitType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MergeableInfo {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.extensions.common;
|
||||
|
||||
import com.google.gerrit.extensions.api.projects.ProjectState;
|
||||
import com.google.gerrit.extensions.client.ProjectState;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.extensions.webui;
|
||||
|
||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||
import com.google.gerrit.extensions.client.GerritTopMenu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user