Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

apply compileGwt on jar project #13

Closed
wants to merge 2 commits into from

Conversation

gesellix
Copy link

@gesellix gesellix commented Jan 3, 2014

Enhance example-library to show how the compileGwt task can depend on the jar task and how the resulting jar file can be modified to contain the gwt compile output.

closes #12

@steffenschaefer
Copy link
Owner

Thank you for the PR! As described in #12 the library example is simply a library (widget library) and won't have GWT compilation functionality in the future.

@steffenschaefer
Copy link
Owner

One additional note: If you configure the jar task this way you will get a jar that contains your classes as well as the GWT compiler output. I personally would create a separate jar or zip task that only packs the GWT compiler output. If you want to upload this to a maven repository you can simply use a special qualifier (e.g. gwt). Then you have 2 jars, one with the classes and one with the compiled GWT stuff.

  task gwtJar(type: Jar) {
    dependsOn compileGwt
    from(compileGwt.outputs) {
      exclude '**/WEB-INF/**'
    }
  }

  publishing {
      publications {
          mavenJava(MavenPublication) {
              from components.java
              artifact gwtJar {
                  classifier "gwt"
              }
          }
      }
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compileGwt on jar projects
2 participants