Skip to content

Commit

Permalink
Merge branch 'release_2.2'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
kevzlou7979 committed Jun 13, 2019
2 parents 023d226 + 7a615e2 commit 99d75b4
Show file tree
Hide file tree
Showing 22 changed files with 202 additions and 64 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# gwt-material-archetype
Archetype for a web application that uses GWT Material Design

# Current Version - 2.1.1
# Current Version - 2.2
### Includes
- Updated GWT Version to 2.8.2
- Updated GWTP Version to 1.5.3
- Updated GMD Version to 2.1.1
- Updated GMD Version to 2.2

# Usage:
1. Download the archetype
2. From the download folder, install the archetype in your local Maven repo by running this command: <code>mvn clean install</code>
3. Create a new project by running the following command in a folder of your choice: <code>mvn archetype:generate -DarchetypeGroupId=com.github.gwtmaterialdesign -DarchetypeArtifactId=gwt-material-archetype -DarchetypeVersion=2.1.1</code>
3. Create a new project by running the following command in a folder of your choice: <code>mvn archetype:generate -DarchetypeGroupId=com.github.gwtmaterialdesign -DarchetypeArtifactId=gwt-material-archetype -DarchetypeVersion=2.2-rc1</code>
4. Follow the prompts

mvn clean install archetype:update-local-catalog
Expand All @@ -19,15 +19,15 @@ Archetype for a web application that uses GWT Material Design

mvn archetype:generate -DarchetypeGroupId=com.github.gwtmaterialdesign \
-DarchetypeArtifactId=gwt-material-archetype \
-DarchetypeVersion=2.1.1
-DarchetypeVersion=2.2

4. Follow the prompts. That's it!

5. Optionally you could specify all the parameters in the command line instead of following the prompts:

mvn archetype:generate -DarchetypeGroupId=com.github.gwtmaterialdesign \
-DarchetypeArtifactId=gwt-material-archetype \
-DarchetypeVersion=2.1.1 \
-DarchetypeVersion=2.2 \
-DgroupId=your.company.domain \
-Dpackage=your.company.domain.myapp \
-DartifactId=your-project \
Expand All @@ -36,7 +36,10 @@ Archetype for a web application that uses GWT Material Design
6. You can also generate a project from Snapshot using the code below:

mvn archetype:generate -DarchetypeGroupId=com.github.gwtmaterialdesign -DarchetypeArtifactId=gwt-material-archetype -DarchetypeRepository=https://oss.sonatype.org/content/repositories/snapshots/ -DarchetypeVersion=2.2-SNAPSHOT
mvn archetype:generate -DarchetypeGroupId=com.github.gwtmaterialdesign
-DarchetypeArtifactId=gwt-material-archetype
-DarchetypeRepository=https://oss.sonatype.org/content/repositories/snapshots/
-DarchetypeVersion=2.3-SNAPSHOT
# Test/Run

Expand Down
2 changes: 1 addition & 1 deletion gwt-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<gwt.version>2.8.2</gwt.version>
<gwtp.version>1.6</gwtp.version>
<gin.version>2.1.2</gin.version>
<gwt-material.version>2.1.1</gwt-material.version>
<gwt-material.version>2.2</gwt-material.version>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
<parent>
<artifactId>gwt-material-parent</artifactId>
<groupId>com.github.gwtmaterialdesign</groupId>
<version>2.1.1</version>
<version>2.2</version>
</parent>

<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-archetype</artifactId>
<version>2.1.1</version>
<version>2.2</version>
<packaging>jar</packaging>

<name>Gwt Material Archetype</name>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/maven/archetype-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<defaultValue>${groupId}</defaultValue>
</requiredProperty>
<requiredProperty key="gwt-material-version">
<defaultValue>2.1.1</defaultValue>
<defaultValue>2.2</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<gwt.version>2.8.2</gwt.version>
<gwtp.version>1.6</gwtp.version>
<gin.version>2.1.2</gin.version>
<gwt-material.version>2.1.1</gwt-material.version>
<gwt-material.version>2.2</gwt-material.version>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='${moduleName}'>
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.gwtplatform.mvp.MvpWithEntryPoint"/>

<extend-configuration-property name="gin.ginjector.modules"
value="${package}.client.gin.ClientModule"/>


<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
Expand All @@ -38,6 +34,10 @@
<inherits name="gwt.material.design.addins.GwtMaterialAddins"/>
<inherits name="gwt.material.design.GwtMaterialTable"/>
<inherits name="gwt.material.design.themes.ThemeBlue"/>
<inherits name="com.gwtplatform.mvp.MvpWithEntryPoint"/>

<extend-configuration-property name="gin.ginjector.modules"
value="${package}.client.gin.ClientModule"/>

<set-configuration-property name="CssResource.enableGss" value="true"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
package ${package}.client.application;

import ${package}.client.application.home.HomeModule;
import ${package}.client.application.profile.ProfileModule;
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;

public class
ApplicationModule extends AbstractPresenterModule {
public class ApplicationModule extends AbstractPresenterModule {

@Override
protected void configure() {
install(new HomeModule());
install(new ProfileModule());

bindPresenter(ApplicationPresenter.class, ApplicationPresenter.MyView.class, ApplicationView.class,
ApplicationPresenter.MyProxy.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@
import com.gwtplatform.mvp.client.annotations.ContentSlot;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.proxy.Proxy;
import com.gwtplatform.mvp.client.presenter.slots.NestedSlot;
import com.gwtplatform.mvp.client.proxy.RevealContentHandler;

public class ApplicationPresenter
extends Presenter<ApplicationPresenter.MyView, ApplicationPresenter.MyProxy> {

interface MyView extends View {
}

@ProxyStandard
interface MyProxy extends Proxy<ApplicationPresenter> {
}

@ContentSlot
public static final GwtEvent.Type<RevealContentHandler<?>> SLOT_MAIN = new GwtEvent.Type<>();
public static final NestedSlot SLOT_MAIN = new NestedSlot();

@Inject
ApplicationPresenter(EventBus eventBus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import gwt.material.design.client.ui.*;

public class ApplicationView extends ViewImpl implements ApplicationPresenter.MyView {

interface Binder extends UiBinder<Widget, ApplicationView> {
}

Expand All @@ -42,6 +43,7 @@ interface Binder extends UiBinder<Widget, ApplicationView> {
@Inject
ApplicationView(Binder uiBinder) {
initWidget(uiBinder.createAndBindUi(this));
bindSlot(ApplicationPresenter.SLOT_MAIN, container);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,11 @@
</m:MaterialHeader>

<m:MaterialSideNavPush m:id="sidenav" width="280">
<m:MaterialLink text="Link 1" iconType="POLYMER"/>
<m:MaterialLink text="Link 2" iconType="POLYMER"/>
<m:MaterialLink text="Link 3" iconType="POLYMER"/>
<m:MaterialLink text="Home" iconType="HOME" href="#"/>
<m:MaterialLink text="Settings" iconType="SETTINGS" href="#profile"/>
</m:MaterialSideNavPush>

<m:MaterialContainer ui:field="container">
<m:MaterialRow paddingTop="120">
<m:MaterialColumn grid="s12 m4 l4" offset="m4 l4">
<m:MaterialPanel ui:field="onlinePanel" textAlign="CENTER">
<m:MaterialIcon marginTop="120" textColor="BLUE_DARKEN_1" iconType="POLYMER" iconSize="LARGE"/>
<m:MaterialLabel text="${projectName}" textColor="BLUE" fontSize="2em"/>
<m:MaterialLabel text="${description}" textColor="BLUE" fontSize="0.8em"/>
</m:MaterialPanel>
</m:MaterialColumn>
</m:MaterialRow>
</m:MaterialContainer>
<m:MaterialContainer ui:field="container" />

<m:MaterialFAB>
<m:MaterialButton ui:field="btnAdd" iconType="ADD" type="FLOATING" size="LARGE" backgroundColor="PINK"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;

public class HomeModule extends AbstractPresenterModule {

@Override
protected void configure() {
bindPresenter(HomePresenter.class, HomePresenter.MyView.class, HomeView.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.gwtplatform.mvp.client.proxy.ProxyPlace;

public class HomePresenter extends Presenter<HomePresenter.MyView, HomePresenter.MyProxy> {

interface MyView extends View {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.gwtplatform.mvp.client.ViewImpl;

public class HomeView extends ViewImpl implements HomePresenter.MyView {

interface Binder extends UiBinder<Widget, HomeView> {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
#L%
-->
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
xmlns:m='urn:import:gwt.material.design.client.ui'>

<g:HTMLPanel>

<p>Hello world!</p>

</g:HTMLPanel>
<m:MaterialPanel>
<m:MaterialPanel height="100vh" addStyleNames="valign-wrapper" textAlign="CENTER">
<m:MaterialPanel style="margin: auto">
<m:MaterialImage url="https://gwtmaterialdesign.github.io/gmd-core-demo/launcher-icons/launcher1x.png" alt="logo"/>
<m:MaterialLabel text="Welcome to gwt-material World" fontSize="2em"/>
<m:MaterialLabel text="Version 2.2" />
</m:MaterialPanel>
</m:MaterialPanel>
</m:MaterialPanel>
</ui:UiBinder>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package ${package}.client.application.profile;

import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;

public class ProfileModule extends AbstractPresenterModule {
@Override
protected void configure() {
bindPresenter(ProfilePresenter.class, ProfilePresenter.MyView.class, ProfileView.class,
ProfilePresenter.MyProxy.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package ${package}.client.application.profile;

import ${package}.client.application.ApplicationPresenter;
import ${package}.client.place.NameTokens;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;

public class ProfilePresenter extends Presenter<ProfilePresenter.MyView, ProfilePresenter.MyProxy> {
interface MyView extends View {
}

@ProxyStandard
@NameToken(NameTokens.PROFILE)
interface MyProxy extends ProxyPlace<ProfilePresenter> {
}

@Inject
ProfilePresenter(
EventBus eventBus,
MyView view,
MyProxy proxy) {
super(eventBus, view, proxy, ApplicationPresenter.SLOT_MAIN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package ${package}.client.application.profile;

import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Widget;
import com.gwtplatform.mvp.client.ViewImpl;

import javax.inject.Inject;

public class ProfileView extends ViewImpl implements ProfilePresenter.MyView {
interface Binder extends UiBinder<Widget, ProfileView> {
}

@Inject
ProfileView(Binder uiBinder) {
initWidget(uiBinder.createAndBindUi(this));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
#%L
GwtMaterial
%%
Copyright (C) 2015 - 2017 GwtMaterialDesign
%%
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:m='urn:import:gwt.material.design.client.ui'>

<m:MaterialPanel>
<m:MaterialPanel height="100vh" addStyleNames="valign-wrapper" textAlign="CENTER">
<m:MaterialPanel style="margin: auto">
<m:MaterialImage url="https://gwtmaterialdesign.github.io/gmd-core-demo/launcher-icons/launcher1x.png" alt="logo"/>
<m:MaterialLabel text="Profile Page" fontSize="2em"/>
<m:MaterialLabel text="Lorem Ipsum Dolor emet" />
</m:MaterialPanel>
</m:MaterialPanel>
</m:MaterialPanel>
</ui:UiBinder>
Loading

0 comments on commit 99d75b4

Please sign in to comment.