mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-03-10 01:30:29 +08:00
add a gradle demo
This commit is contained in:
parent
35dbc1f497
commit
9ab737ce57
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ target/
|
||||
|
||||
# gradle ignore
|
||||
build/
|
||||
out/
|
||||
.gradle/
|
||||
|
||||
# eclipse ignore
|
||||
|
23
demo/java-demo/build.gradle
Normal file
23
demo/java-demo/build.gradle
Normal file
@ -0,0 +1,23 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = 'com.alibaba.testable'
|
||||
version = '1.0.0-SNAPSHOT'
|
||||
sourceCompatibility = '8'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
|
||||
testImplementation('com.alibaba.testable:testable-processor:0.3.2-SNAPSHOT')
|
||||
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.3.2-SNAPSHOT')
|
||||
testRuntimeOnly('com.alibaba.testable:testable-agent:0.3.2-SNAPSHOT')
|
||||
}
|
||||
|
||||
test {
|
||||
jvmArgs "-javaagent:${classpath.find { it.name.contains("testable-agent") }.absolutePath}"
|
||||
useJUnitPlatform()
|
||||
}
|
@ -80,4 +80,4 @@ test {
|
||||
}
|
||||
```
|
||||
|
||||
> 该配置尚未在Gradle项目上经过实际验证,可行性待确认。
|
||||
> 注意:由于Gradle的构建与测试运行机制与Maven稍有差异,当前在Gradle项目里,`@PrivateAccessor`注解和`TestableTool.TEST_CASE`功能存在已知BUG,其余功能均可正常使用
|
||||
|
Loading…
Reference in New Issue
Block a user