Hi Daniel,

Great work! a few issues:
- the gradlew wrapper script mode needs to switch to be executable (unix
flag)
- gradle is running a lot of stuff in the configuration phase, before we
even know what it does. For example, running ./gradlew tasks gives me the
below error. This means that not only is it expecting a flag, but also
executing considerable work in the configuration phase. I prefer to always
delay work until I need it, which is usually in the execution phase.
- I tried to tackle the first TODO that pulls configuration from your
properties file (a small patch, so I put it in this email). Is this what
you're looking for?

==== Patch for properties loading ====
diff --git a/build.gradle b/build.gradle
index d47fa9e..5f4e8cb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -17,11 +17,12 @@
  * under the License.
  */

-// TODO: Versions should come form
src/main/resource/o/a/f/c/version.properties
-ext.versionCanonical = "3.0.0-nightly-incubating"
-ext.versionForMaven = "3.0.0-SNAPSHOT"
-ext.versionForOSGi = "3.0.0.nightly-incubating"
-ext.versionForMf = "2.97.0"
+Properties props = new Properties()
+props.load(file('freemarker-core/src/main/resources/org/apache/freemarker/core/version.properties').newDataInputStream())
+ext.versioncanonical = props.getProperty('version')
+ext.versionformaven = props.getProperty('mavenVersion')
+ext.versionforosgi = props.getProperty('versionForOSGi')
+ext.versionformf = props.getProperty('versionForMf')

 allprojects {
     group = "org.apache.freemarker"
==== end of patch ====

==== error message when running ./gradlew tasks ====
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
Current
                                 Dload  Upload   Total   Spent    Left
Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01
--:--:--     0
100 90.6M  100 90.6M    0     0  3225k      0  0:00:28  0:00:28 --:--:--
3975k
~/.gradle/wrapper/dists/gradle-3.5-all/fc3129dda6113a2b1fa07735831d27c6
~/Desktop/active/development/work/incubator-freemarker
~/Desktop/active/development/work/incubator-freemarker
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* Where:
Build file
'/home/taher/Desktop/active/development/work/incubator-freemarker/build.gradle'
line: 49

* What went wrong:
The bootClasspathJava7 property must be set. Maybe you have missed this
step: Copy gradle.properties.sample into gradle.properties, and edit it to
describe your environment. Alternatively, pass the properties to gradle
with -PbootClasspathJava7="...".
==== end of error message ====

On Sun, May 14, 2017 at 1:54 PM, Daniel Dekany <[email protected]> wrote:

> I have committed a first version of this... It's already modularized
> as you can see, though freemarker-dom is not yet separated from core.
>
> Please find the problems with it. Also, anyone wants to help with the
> TODO-s in the Gradle scripts?
>
> --
> Thanks,
>  Daniel Dekany
>
>

Reply via email to