You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by Martin Desruisseaux <ma...@geomatys.com> on 2017/07/27 17:16:17 UTC
Creation of Android branch on SVN repository
Hello Sisinda
I created an "Android" branch on Apache SIS source code repository. For
now, I ported only your work on the pom.xml files; I did not yet ported
any work on Java files (they will be the topic of another commit later).
Consequently, if you want to merge the "Android" branch into your GitHub
clone, you may have some conflicts to resolve in pom.xml files but not
in other places (normally).
The main change that I did in the pom.xml files compared to the files on
your GitHub clone was to avoid repetition:
* Build configuration in the root pom.xml file instead then repeated
in child pom.xml files.
* Dependencies declared in sis-utility omitted since they were
declared in the parent pom.xml file.
* Maven scope of JavaEE dependencies left to "provided" (I omitted the
change to "compile").
I could not test yet if those changes work since since Maven reports a
missing core/sis-utility/src/main/AndroidManifest.xml file. Maybe it was
forgotten from previous commits?
I also have a question: the following dependencies looks like for
testing purpose (judging by their name), but have a "provided" or
"compile" scope instead then "test". Is it intentional?
* android-test
* com.android.support.test
Thanks,
Martin
Re: Creation of Android branch on SVN repository
Posted by Martin Desruisseaux <ma...@geomatys.com>.
Le 01/08/2017 à 16:34, Sisinda Dinusha a écrit :
> Did you mean the android.graphics.Matrix class? The reason I didn't
> use the Matrix class is because it uses float instead of double and I
> was not sure float would be sufficient for our task.
>
Indeed it seems to be that class.
We do not need to port AffineTransform to Android since actually, it
does not provide any new functionality. The default implementations in
org.apache.sis.referencing.transform already do all the work needed. The
AffineTransform class in Apache SIS is used mostly for inter-operability
with Java2D - this goal obviously doesn't apply to the Android platform.
Rather than porting parts of Java2D, I think we should use the classes
provided by the Android platform. Indeed their precision are lower, but
if we need double precision we can use the other Apache SIS classes.
I recommend to define AffineTransform is a wrapper around the Android
Affine class for now. As a next step, we may reduce (but not eliminate)
usage of that class in the rest of Apache SIS for avoiding the precision
problem. We would keep that class for cases where we need
inter-operability with the Android graphic package.
Martin
Re: Creation of Android branch on SVN repository
Posted by Sisinda Dinusha <si...@gmail.com>.
Hello Martin
> So the "provided" and "compile" scope of "android-test" and
> "com.android.support.test" are temporary, and the scope is expected to
> be changed to "test" when the instrumented testing issues will be resolved?
Yes it is.
> Looking at AffineTransform and Curve classes, the source code seems very
> similar to code from the JDK. Since JDK code is under GPL license, we
> can not create derivative work in Apache projects. Would it be possible
> to omit those classes?
Thank you for notifying this. I will look into this one.
> Regarding AffineTransform, Android has its own Affine
> class. What about creating an AffineTransform class as a wrapper around
the Android Affine class?
Did you mean the android.graphics.Matrix class? The reason I didn't use
the Matrix class is because it uses float instead of double and I was
not sure float would be sufficient for our task.
--
Sisinda
Re: Creation of Android branch on SVN repository
Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Sisinda
Le 29/07/2017 à 05:10, Sisinda Dinusha a écrit :
> I forgot to add those new files. Now they have pushed to the repo.
>
Thanks.
> I was unable to run Instrumented tests (the tests that run in an
> Android environment) using Maven (yet). So far I compiled those tests
> and ran them through Android Studio IDE which is using Gradle. We
> maybe able to run tests direclty using Maven because Android Maven
> plugin have support for Instrumented testing according to the
> documentation.
So the "provided" and "compile" scope of "android-test" and
"com.android.support.test" are temporary, and the scope is expected to
be changed to "test" when the instrumented testing issues will be resolved?
About the recent work related to Java2D, I would suggest to put the
Point2D, Path2D, etc. classes in another package than
"org.apache.sis.geometry". The reason is that "org.apache.sis.geometry"
is intended for ISO 19107 geometries, which are very different than
Java2D geometries. The ISO 19107 geometries are not yet in Apache SIS,
but this is future work we would like to do. Another home for Java2D
classes could be "org.apache.sis.internal.referencing.j2d", together
with existing Java2D-related classes.
Looking at AffineTransform and Curve classes, the source code seems very
similar to code from the JDK. Since JDK code is under GPL license, we
can not create derivative work in Apache projects. Would it be possible
to omit those classes? We do not need to reproduce all Java2D
functionalities in the Android port of SIS. It is okay if we lost Path2D
for example. Regarding AffineTransform, Android has its own Affine
class. What about creating an AffineTransform class as a wrapper around
the Android Affine class? It may also ease integration with other
Android API later.
Martin
Re: Creation of Android branch on SVN repository
Posted by Sisinda Dinusha <si...@gmail.com>.
Hello Martin
> Maven reports a missing core/sis-utility/src/main/AndroidManifest.xml file.
> Maybe it was forgotten from previous commits?
I forgot to add those new files. Now they have pushed to the repo.
> I also have a question: the following dependencies looks like for testing
> purpose (judging by their name), but have a "provided" or "compile" scope
instead then "test". Is it intentional?
>
> android-test
> com.android.support.test
I was unable to run Instrumented tests (the tests that run in an Android
environment) using Maven (yet). So far I compiled those tests and ran
them through Android Studio IDE which is using Gradle. We maybe able to
run tests direclty using Maven because Android Maven plugin have support
for Instrumented testing according to the documentation.
On Thu, Jul 27, 2017 at 10:46 PM, Martin Desruisseaux
<ma...@geomatys.com> wrote:
> Hello Sisinda
>
> I created an "Android" branch on Apache SIS source code repository. For now,
> I ported only your work on the pom.xml files; I did not yet ported any work
> on Java files (they will be the topic of another commit later).
> Consequently, if you want to merge the "Android" branch into your GitHub
> clone, you may have some conflicts to resolve in pom.xml files but not in
> other places (normally).
>
> The main change that I did in the pom.xml files compared to the files on
> your GitHub clone was to avoid repetition:
>
> Build configuration in the root pom.xml file instead then repeated in child
> pom.xml files.
> Dependencies declared in sis-utility omitted since they were declared in the
> parent pom.xml file.
> Maven scope of JavaEE dependencies left to "provided" (I omitted the change
> to "compile").
>
> I could not test yet if those changes work since since Maven reports a
> missing core/sis-utility/src/main/AndroidManifest.xml file. Maybe it was
> forgotten from previous commits?
>
> I also have a question: the following dependencies looks like for testing
> purpose (judging by their name), but have a "provided" or "compile" scope
> instead then "test". Is it intentional?
>
> android-test
> com.android.support.test
>
> Thanks,
>
> Martin
>
>
--
Sisinda