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:
David Ostrovsky
2015-01-23 23:40:11 +01:00
committed by David Pursehouse
parent 6f560ffbdd
commit 7a722f73fd
108 changed files with 163 additions and 170 deletions

View File

@@ -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'],
)

View File

@@ -14,7 +14,5 @@
limitations under the License.
-->
<module>
<source path='api' />
<source path='common' />
<source path='webui' />
<source path='client' />
</module>

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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,

View File

@@ -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;

View File

@@ -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,

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -14,6 +14,8 @@
package com.google.gerrit.extensions.common;
import com.google.gerrit.extensions.client.SubmitType;
import java.util.List;
public class MergeableInfo {

View File

@@ -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;

View File

@@ -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;