Comments (6)
This should work:
dependencies {
gwt files('sources.jar')
}
from gwt-gradle-plugin.
Thanks a lot for the quick reply. sources.jar actually originates from dependencies, so I get the error below. Any suggestions?
dependencies {
compile( [
'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0:sources',
'org.apache.oltu.oauth2:org.apache.oltu.oauth2.common:1.0.0:sources'
] )
gwt files( 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0:sources' )
}
...
:lib:js:d3:jar UP-TO-DATE
:app:d3showcase:compileJava
FAILURE: Build failed with an exception.
- What went wrong:
Could not resolve all dependencies for configuration ':app:d3showcase:gwt'.Cannot convert URL 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0:sources' to a file.
If I exclude the gwt entry from the dependencies stanza and then compileGWT I get
...
:app:d3showcase:compileGwt
Compiling module com.avaritia.app.d3showcase.D3Showcase
Finding entry point classes
[ERROR] Errors in 'file:/home/dave/src/gwt/app/d3showcase/src/main/java/com/avaritia/app/d3showcase/client/EntryPointImpl.java'
[ERROR] Line 89: No source code is available for type org.apache.oltu.oauth2.client.request.OAuthClientRequest; did you forget to inherit a required module?
from gwt-gradle-plugin.
This should work:
dependencies {
gwt 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0:sources'
}
from gwt-gradle-plugin.
That doesn't work for me either.
In your examples I don't see any gwt entries within a dependencies stanza but I do see "src +=" adding source files in the gwt stanzas, so I'm fundamentally not understanding where sources should be added for the compileGWT task. Could you take a few minutes and add an example to the repo that uses 3rd party sources in a jar?
I sincerely appreciate the time you've already spent helping me.
from gwt-gradle-plugin.
Both things (dependencies and source) are ultimately added to the classpath when invoking GWT compiler. So technically it doesn't matter how source files are getting referenced.
There are two sources where stuff can come from:
- From the project itself (source folders)
- From dependencies
src is only thought to be used to define which source folders should be used by GWT. Referencing anything that is not in the scope of the same Gradle build is not the intention of this.
Everything that comes from the outside of the project should cleanly declared as dependency. Stuff that should only be seen by the Java compiler and GWT compiler but should not be part of the resulting *.war file, can be added using the "gwt" configuration.
Two counter questions:
- What is a stanza (Sorry I'm not a native speaker)?
- What doesn't work?
from gwt-gradle-plugin.
A stanza is a block of text, eg
dependencies {
compile project(':example-library')
}
or
repositories {
mavenCentral()
}
Anyway, it seems like I had something else wrong in my build.gradle file because when I tried a minimal example then
dependencies {
gwt 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0:sources'
}
worked. Prior to this dialogue I didn't know that I could use dependencies { gwt ... }, so it was not a waste of time. Thank-you very much!
from gwt-gradle-plugin.
Related Issues (20)
- [gwt 2.7.0/gradle 2.12./plug-in 0.6] gwtSuperDev - java.lang.OutOfMemoryError HOT 8
- [GWT 2.8/Pluging 0.6] Issue with gwt sub-projects HOT 1
- [GWT 2.8-SNAPSHOT/Gradle 2.13] Properties issue HOT 5
- Make gwt-unitcache and war directories configurable
- gwt + gradle + lombok issues resolved
- Have any way to generate i18n and generateAsync supported by gwt-maven-plugin? HOT 6
- vaadinCompile issue, with vaadin 8 at 1.0 version
- compileGwt is missing module descriptor of a submodule on classpath HOT 8
- Make the compile tasks cacheable
- Missing support for Gradle Composite Builds
- Gradle ... single directory for all classes .. is scheduled to be removed in Gradle 5.0 HOT 1
- gwt-gradle-plugin uses deprecated api by Gradle 4.0 HOT 3
- Updated GPE Changes Property Variables
- GenerateGdt Task Needs To Also Be a Dependency of eclipseWtp
- Gradle upgrade to 5.4 causes build failure HOT 3
- CreateProcess error=206, The filename or extension is too long HOT 1
- Buildship Support HOT 1
- Has this plug-in been tested with GWT 2.8.Beta? HOT 2
- Integreation with Gretty plugin
- example build failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-gradle-plugin.