You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2016/12/07 10:58:10 UTC

Gradle Build support

I didn't really notice all the nice things that Paul has done in the build
system.

I particularly like the

    compile zest.extension( 'entitystore-jdbm' )

Would it be possible to create and distribute a "Polygene plugin", which
does this for downstream users?


apply plugin: 'polygene' // also sets the repositories needed.
dependencies {
    compile polygene.core()  // maybe test-support should be added to
testCompile
    compile polygene.library.http()
    compile polygene.extension.entitystore_jdbm()
}

or similar, with a 'global' polygene.version defining the version for all
of the components.

Just an idea...


Cheers
-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Re: Gradle Build support

Posted by Paul Merlin <pa...@apache.org>.
Gang,

I just pushed a refactor of our build. Mostly detangling the historical
pile of tasks. It's still a bit rough on the edges but should do its
job. Some task names and location have changed. Please see
manual/src/docs/tutorials/howto-build-system.txt

Build project names and published artifact names are now decoupled, we
can type:

  ./gradlew :core:runtime:test

instead of:

  ./gradlew:org.apache.polygene.core:org.apache.polygene.core.runtime:test

and thanks to how Gradle task selection work we also can abbreviate this to:

  ./gradlew :c:r:te

so much less typing.

All global tasks from the root project moved into dedicated sub-projects
like 'distributions' and 'release'.

About distributions, the binary distribution now contains binaries in a
local maven repository, including metadata, it's easier to use. The
dist:zipDepDist task assemble a zip containing a maven repository with
all dependencies needed to work with the SDK, including source & javadoc
when available. No more "go offline helpers". The latter zip is quite
big and is not included in the release.

An intended side-effect of these changes is that the build is now much
faster when building a development version (aka. version '0') by not
doing what's necessary when building a SNAPSHOT or release version.

Oh and the whole build is now safe to run with parallel enabled,
including tests. Either use --parallel or add org.gradle.parallel=true
to gradle.properties. Running the whole test suite from a clean build
now takes less than 5 minutes on my 8 cores laptop, was 10+ before. The
only caveat so far is that to debug from the IDE you have to disable
parallel execution, that's why it's not enabled by default.

That's my small christmas gift to you, I hope it won't get in your way
and give you a better experience. I'll go eat and drink too much with
familly and friends and come back next year with a proposal to unify
serialization and get rid of org.json.

Cheers

/Paul


Re: Gradle Build support

Posted by Paul Merlin <pa...@apache.org>.
So, yes we should provide users a Gradle plugin to easily build a
Polygene library/extension/application.

About the changes I made to the SDK build. For now I just moved all
build logic to buildSrc so it's more manageable and easy to refactor.
From a gigantic root build.gradle file we moved to gigantic plugins in
buildSrc. I added the minimal set of niceties so that build scripts
spread over the modules are concise. Eating our own dog food. I'll
refactor this slowly and progressively and at some point we'll be able
to extract a Gradle plugin to make things easy for users. It may be on
time for 3.0, it may not.

The main goal of such a Polygene Gradle plugin will mostly be about easy
dependencies declaration. We don't need much more than that I think, as
a first step at least.


Niclas Hedhman a �crit :
> Actually, more like;
>
> apply plugin: 'polygene' // also sets the repositories needed.
>> dependencies {
>>     polygene.core()  // sets up compile, runtime, testCompile
>>
>> if possible...
>
>
> On Wed, Dec 7, 2016 at 6:58 PM, Niclas Hedhman <ni...@hedhman.org> wrote:
>
>> I didn't really notice all the nice things that Paul has done in the build
>> system.
>>
>> I particularly like the
>>
>>     compile zest.extension( 'entitystore-jdbm' )
>>
>> Would it be possible to create and distribute a "Polygene plugin", which
>> does this for downstream users?
>>
>>
>> apply plugin: 'polygene' // also sets the repositories needed.
>> dependencies {
>>     compile polygene.core()  // maybe test-support should be added to testCompile
>>     compile polygene.library.http()
>>     compile polygene.extension.entitystore_jdbm()
>> }
>>
>> or similar, with a 'global' polygene.version defining the version for all
>> of the components.
>>
>> Just an idea...
>>
>>
>> Cheers
>> --
>> Niclas Hedhman, Software Developer
>> http://zest.apache.org - New Energy for Java
>>
>
>
>

Re: Gradle Build support

Posted by Niclas Hedhman <ni...@hedhman.org>.
Actually, more like;

apply plugin: 'polygene' // also sets the repositories needed.
> dependencies {
>     polygene.core()  // sets up compile, runtime, testCompile
>
> if possible...


On Wed, Dec 7, 2016 at 6:58 PM, Niclas Hedhman <ni...@hedhman.org> wrote:

> I didn't really notice all the nice things that Paul has done in the build
> system.
>
> I particularly like the
>
>     compile zest.extension( 'entitystore-jdbm' )
>
> Would it be possible to create and distribute a "Polygene plugin", which
> does this for downstream users?
>
>
> apply plugin: 'polygene' // also sets the repositories needed.
> dependencies {
>     compile polygene.core()  // maybe test-support should be added to testCompile
>     compile polygene.library.http()
>     compile polygene.extension.entitystore_jdbm()
> }
>
> or similar, with a 'global' polygene.version defining the version for all
> of the components.
>
> Just an idea...
>
>
> Cheers
> --
> Niclas Hedhman, Software Developer
> http://zest.apache.org - New Energy for Java
>



-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Re: Gradle Build support

Posted by Paul Merlin <pa...@apache.org>.
Niclas Hedhman a �crit :
> I didn't really notice all the nice things that Paul has done in the build
> system.

:)

> I particularly like the
>
>     compile zest.extension( 'entitystore-jdbm' )
>
> Would it be possible to create and distribute a "Polygene plugin", which
> does this for downstream users?
>
>
> apply plugin: 'polygene' // also sets the repositories needed.
> dependencies {
>     compile polygene.core()  // maybe test-support should be added to
> testCompile
>     compile polygene.library.http()
>     compile polygene.extension.entitystore_jdbm()
> }
>
> or similar, with a 'global' polygene.version defining the version for all
> of the components.
>
> Just an idea...

Oh, you found out my plan ;-)