innobead / pygradle Goto Github PK
View Code? Open in Web Editor NEWPython Gradle plugin
License: Apache License 2.0
Python Gradle plugin
License: Apache License 2.0
When I try to use pygradle with newer gradles, I get errors like
- Error: Type 'com.innobead.gradle.task.PythonTestTask' property 'virtualenvDir' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as @Internal.
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
See https://docs.gradle.org/7.2/userguide/more_about_tasks.html#sec:task_input_output_annotations for more information on how to annotate task properties.
#36
This seems to make gradle happy.
Gradle version:
$ gradle --version
Build time: 2017-04-10 13:37:25 UTC
Revision: b762622a185d59ce0cfc9cbc6ab5dd22469e18a6
Groovy: 2.4.10
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_121 (Oracle Corporation 25.121-b13)
OS: Linux 4.4.0-53-generic amd64
Stacktrace:
Caused by: java.lang.NoSuchMethodError: org.gradle.process.ExecSpec.setWorkingDir(Ljava/io/File;)V
at com.innobead.gradle.task.PythonTestTask$action$2.execute(PythonTestTask.kt:64)
at com.innobead.gradle.task.PythonTestTask$action$2.execute(PythonTestTask.kt:12)
at org.gradle.api.internal.file.DefaultFileOperations.exec(DefaultFileOperations.java:175)
at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1036)
at com.innobead.gradle.task.PythonTestTask.action(PythonTestTask.kt:62)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:692)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:675)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.execute(ExecuteActionsTaskExecuter.java:115)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.execute(ExecuteActionsTaskExecuter.java:109)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:109)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:90)
... 70 more
I was experimenting this plugin. By default, it uses python2.7. What property should I set to use so that I can use python 3.7.4
Hi,
hope find you well with this cold call.
I am an author of mocking framework for Kotlin
I see you are using mockito-kotlin.
I just want you to be aware that there is solution that fully supports Kotlin and ask to try it in your new/current projects.
I can help you if you answer to this issue.
Thanks and please star it
I am attempting to use your plugin on Windows 10 with WSL installed. When getting to the 'Installing virtualenv' step, I get bash export errors because my bash path contains spaces. I think the export on the following line needs to have the PATH environment enclosed in double quotes to keep bash from thinking it needs to parse the command apart.
With "--python" parameter
eg. virtualenv --python=/usr/bin/python2.6 or --python=/usr/local/bin/python3.6
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.innobead:gradle-python-plugin:1.3.7"
}
}
apply plugin: "com.innobead.python"
python {
testSourceDirs = files('tests/test.py')
}
There are failing tests but build is marked as successful:
=================================== FAILURES ===================================
_________________________________ test_answer __________________________________
def test_answer():
assert inc(3) == 5
E assert 4 == 5
E + where 4 = inc(3)
../../tests/test.py:5: AssertionError
=============================== warnings summary ===============================
-- Docs: https://docs.pytest.org/en/latest/warnings.html
---------- coverage: platform darwin, python 3.7.4-final-0 -----------
========================= 1 failed, 1 warning in 0.03s =========================
...
BUILD SUCCESSFUL in 21s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.