Comments (5)
Hi,
I am not sure I follow you on that one. api
is not used as means to influence the scope on pom file. It is there to help library developers to declare that those dependencies that are marked as api
should be transitively added to classpath through all the dependency tree consuming the relevant developed lib as the user interface of that lib uses types from that api
marked dependency/ies.
I hope this is clear enough.
If you can clarify what exactly you are trying to achieve (maybe adding some sample project) I can maybe try and give you better guidance.
Any how in general I do plan to add this. Even sooner then later if it will get up voted :)
Cheers
from gradle-crossbuild-scala.
Hi
Is it still on the cards to add this? It would be handy if it was 😃
Currently if you use implementation to declare the Scala library dependency...
dependencies {
implementation ("org.scala-lang:scala-library:2.13.3")
}
Gradle gives an error on compile because it can't find the scala-library version...
A problem occurred configuring project ':Foo'.
> assert possibleDefaultScalaVersions.size() > 0
| | |
[] 0 false
Could not discover default scala version. Scala library dependency is missing ?
It works fine if the Scala library is declared using compile...
dependencies {
compile ("org.scala-lang:scala-library:2.13.3")
}
Also, for the dependencies that include ?
Gradle can't resolve api
dependencies...
./gradlew clean Foo:dependencies
gives...
compileClasspath - Compile classpath for source set 'main'.
+--- com.typesafe.scala-logging:scala-logging_?:3.9.2 FAILED
when the dependency is declared with api
like...
api("com.typesafe.scala-logging:scala-logging_?:3.9.2")
but works when the dependency is declared using compile
...
compile("com.typesafe.scala-logging:scala-logging_?:3.9.2")
then no error...
compileClasspath - Compile classpath for source set 'main'.
\--- com.typesafe.scala-logging:scala-logging_2.13:3.9.2
from gradle-crossbuild-scala.
Hi @Arthurm1 :)
I would like first to point out that from version 0.12 onwards you do not need use ? for scala 3rd party libs. You can choose one scala version which is naturally the default scala version of your project and the replacement of the scala version while you cross building is done anyhow.
I will try and clear some time to evaluate the work needed. Keep tuned ;)
from gradle-crossbuild-scala.
Hi,
api [...] is there to help library developers to declare that those dependencies that are marked as api should be transitively added to classpath through all the dependency tree
I think that is something very useful for lib developpers, as it avoids lib users to add all the transitive dependencies (and to know what lib they need to add).
It would be great to have this feature compatibility for cross building scala libs :)
from gradle-crossbuild-scala.
Reclosing after adding correct fix milestone
from gradle-crossbuild-scala.
Related Issues (20)
- Current maintenance and development effort of plugin HOT 4
- Possible root cause for `SourceSet with name 'crossBuildScala_211' not found` HOT 5
- Publish Sources and JavaDoc HOT 4
- gradle 7 support. HOT 1
- For an implementation dependency the compile scope is used instead of runtime scope in the generated pom HOT 1
- Test suite takes long time to complete
- Question: How to pass on extra information to subprojects? HOT 3
- When using Gradle Kotlin scripts and using the Plugin's ext property Exception is raised
- To add a task that will run all cross build jar tasks in a bulk
- Plugin Building - allow project to publish to maven local
- Support Gradle shadow plugin
- Support for Scala 3 HOT 2
- pom dependency scopes correct for main build but incorrect for crossbuilds HOT 1
- Support incremental build HOT 4
- Emulating sbt's CrossVersion.for3Use2_13 HOT 1
- [Need help] Adding Scala 3 support to an existing Scala 2.xx gradle build HOT 2
- Set `-release` parameter instead of `-target` HOT 14
- Plugin wrongly replaces scala-library dependency with scala3-library_3 as part of dependency resolution
- Target compilation strategy names are confusing / misleading
- Add target compilation strategy none 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 gradle-crossbuild-scala.