keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

Migrate to Gradle #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Beside some basic compile and test tasks, we also need:

1. a jarjar task to change the package names of cglib, asm and objenesis.
This task should depend on the init task and be depended by the compile
task. It should also automatically download the jar file of jarjar. It will
do nothing if the jar files of jarjar and jarjarified dependencies are present.
2. to figure out how to add the jarjarified dependencies to the classpath.
3. to figure out how to package with the jarjarified dependencies.
4. a integration_test task to perform integration test against the packaged
jar file.
5. to figure out how to install to the maven repository.

Original issue reported on code.google.com by JohnnyJianHY on 19 Mar 2009 at 10:33

GoogleCodeExporter commented 9 years ago

Original comment by julien.g...@gmail.com on 19 Mar 2009 at 6:49

GoogleCodeExporter commented 9 years ago
I have added the 'install' and 'dists' tasks, but I wonder how do you upload 
the jar
file? Do you need a specific task to do it?

Gradle is so powerful that it can help you do all the work of release completely
automatically ;)

Original comment by JohnnyJianHY on 23 Mar 2009 at 7:37

GoogleCodeExporter commented 9 years ago
The jar uploading task was done by the mvn:deploy command. The 
distributionManagement definition is doing 
the trick and scp the file to a remote server. I've give access to maven 
through the automatic rsync process.

Apparently gradle is compatible with this process. I'll have a look.

Original comment by julien.g...@gmail.com on 23 Mar 2009 at 7:44

GoogleCodeExporter commented 9 years ago
I am thinking about generating the document from the .wiki file automatically. 
Do you
have any idea? Should we write a converter by ourselves?

Original comment by JohnnyJianHY on 30 Mar 2009 at 3:19

GoogleCodeExporter commented 9 years ago
Are talking about converting the .wiki document page to grails version?

Original comment by julien.g...@gmail.com on 31 Mar 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Convert the .wiki file to html

Original comment by JohnnyJianHY on 31 Mar 2009 at 8:21

GoogleCodeExporter commented 9 years ago
I thought about it when I was doing the website and it seems to be some work to 
do it. The real difficulty is 
groovy syntax support.

Original comment by julien.g...@gmail.com on 1 Apr 2009 at 7:38

GoogleCodeExporter commented 9 years ago
I think we can just create a simple parser with regex.

Original comment by JohnnyJianHY on 1 Apr 2009 at 11:50

GoogleCodeExporter commented 9 years ago
I am not sure if this is that easy, give it a try if you want.

Maintaining two site (google code and gmock.org) is not that easy. 
Alternatively we could point gmock.org to 
google code directly, like mockito.

Original comment by julien.g...@gmail.com on 2 Apr 2009 at 6:22

GoogleCodeExporter commented 9 years ago
That will be an easy way.

But I wasn't thinking of maintaining two sites, but generating documentation in 
the
distribution (in the 'docs' directory) automatically.

Original comment by JohnnyJianHY on 2 Apr 2009 at 11:24

GoogleCodeExporter commented 9 years ago
I have implemented a wiki-html converter. Please adjust the template
(docs/template.gsp), especially the css for the catalog.

Original comment by JohnnyJianHY on 9 Apr 2009 at 6:42

GoogleCodeExporter commented 9 years ago
Nice one. I'll have a look at it (probably this week end)

Original comment by julien.g...@gmail.com on 9 Apr 2009 at 6:56

GoogleCodeExporter commented 9 years ago
I had a look at it and it look pretty good on my machine (or maybe I am missing 
something)

I am amazed by the wiki converter. Well done.

By the way, is gradle generating the zip file? 

Original comment by julien.g...@gmail.com on 12 Apr 2009 at 2:06

GoogleCodeExporter commented 9 years ago
Yes, try "gradle dists", you can find the 'gmock-x.x.x-all.zip' file in the
'build/distributions' directory.

You can refer to http://code.google.com/p/gmock/wiki/HowToBuild for major tasks.

Original comment by JohnnyJianHY on 12 Apr 2009 at 2:27

GoogleCodeExporter commented 9 years ago
Thanks. I looked at it and missed the dists option. Oops.

Original comment by julien.g...@gmail.com on 13 Apr 2009 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 19 Apr 2009 at 4:34

GoogleCodeExporter commented 9 years ago
Yes it was pretty easy to do. 

However I am having an exception during the uploadLibs task  around the
 :samples:cache:compile (which is weird as it's not require by the task)

It didn't affect me for the release but if you've got an idea, it look like 
this:

Execution failed for task :samples:cache:compile.
    at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:185)
    at org.gradle.execution.DefaultTaskExecuter.executeTask(DefaultTaskExecuter.java:161)
    at org.gradle.execution.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:148)
    at org.gradle.execution.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:77)
    at org.gradle.execution.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:88)
    at 
org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBui
ldExecuter.java:104)
    at org.gradle.Gradle.runInternal(Gradle.java:123)
    at org.gradle.Gradle.run(Gradle.java:93)
    at org.gradle.Main.execute(Main.java:232)
    at org.gradle.Main.main(Main.java:77)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.gradle.BootstrapMain.main(BootstrapMain.java:53)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/MarkerFactory
    at org.gradle.api.logging.Logging.<clinit>(Logging.java:30)
    at org.gradle.logging.AntLoggingAdapter.messageLogged(AntLoggingAdapter.java:77)
    at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:2171)
    at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2271)
    at org.apache.tools.ant.Project.log(Project.java:449)
    at org.apache.tools.ant.Task.log(Task.java:294)
    at org.apache.tools.ant.taskdefs.Definer.resourceToURLs(Definer.java:381)
    at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:256)
    at org.apache.tools.ant.ComponentHelper.checkNamespace(ComponentHelper.java:802)
    at org.apache.tools.ant.ComponentHelper.getDefinition(ComponentHelper.java:259)
    at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:236)
    at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:215)
    at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:411)
    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
    at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:186)
    at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
    at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:154)
    at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at Script1.run(Script1.groovy:5)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:561)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:536)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
    at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
    at org.gradle.util.GradleUtil.executeIsolatedAntScript(GradleUtil.groovy:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
    at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1105)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
    at org.gradle.api.tasks.compile.AntGroovyc.execute(AntGroovyc.groovy:56)
    at org.gradle.api.tasks.compile.GroovyCompile.compile(GroovyCompile.java:81)
    at org.gradle.api.tasks.compile.GroovyCompile$1.execute(GroovyCompile.java:54)
    at org.gradle.api.internal.AbstractTask.doExecute(AbstractTask.java:221)
    at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:175)
    ... 14 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.slf4j.MarkerFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    ... 65 common frames omitted

Original comment by julien.g...@gmail.com on 19 Apr 2009 at 4:43

GoogleCodeExporter commented 9 years ago
slf4j is missing? Maybe you can try reinstall gradle

Original comment by JohnnyJianHY on 20 Apr 2009 at 1:36