Skip to content

Commit eafd65a

Browse files
authored
Rename utbot-gradle package (#83)
1 parent 96aef0c commit eafd65a

17 files changed

+77
-95
lines changed

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ subprojects {
2727
apply plugin: 'java'
2828
apply plugin: 'maven-publish'
2929

30+
publishing {
31+
publications {
32+
jar(MavenPublication) {
33+
from components.java
34+
groupId 'org.utbot'
35+
artifactId project.name
36+
}
37+
}
38+
}
39+
3040
repositories {
3141
mavenCentral()
3242
maven { url 'https://jitpack.io' }

utbot-gradle/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ configurations.all {
1818
gradlePlugin {
1919
plugins {
2020
sarifReportPlugin {
21-
id = 'org.utbot.sarif'
22-
implementationClass = 'org.utbot.sarif.SarifGradlePlugin'
21+
id = 'org.utbot.gradle.plugin'
22+
implementationClass = 'org.utbot.gradle.plugin.SarifGradlePlugin'
2323
}
2424
}
2525
}

utbot-gradle/docs/utbot-gradle.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ In addition, it creates one big SARIF-report containing the results from all the
4343
<details>
4444
<summary>Groovy</summary>
4545
<pre>
46-
apply plugin: 'org.utbot.sarif'
46+
apply plugin: 'org.utbot.gradle.plugin'
4747
</pre>
4848
</details>
4949

5050
<details>
5151
<summary>Kotlin DSL</summary>
5252
<pre>
53-
apply(plugin = "org.utbot.sarif")
53+
apply(plugin = "org.utbot.gradle.plugin")
5454
</pre>
5555
</details>
5656

@@ -195,11 +195,8 @@ There are two ways to do it.
195195
buildscript {
196196
repositories {
197197
mavenLocal()
198-
maven {
199-
url "http://[your-ip]:[your-port]/repository/utbot-uber/"
200-
allowInsecureProtocol true
201-
}
202198
mavenCentral()
199+
maven { url 'https://jitpack.io' }
203200
}
204201
&nbsp;
205202
dependencies {
@@ -215,11 +212,8 @@ There are two ways to do it.
215212
buildscript {
216213
repositories {
217214
mavenLocal()
218-
maven {
219-
url = uri("http://[your-ip]:[your-port]/repository/utbot-uber/")
220-
isAllowInsecureProtocol = true
221-
}
222215
mavenCentral()
216+
maven { url 'https://jitpack.io' }
223217
}
224218
&nbsp;
225219
dependencies {
@@ -239,11 +233,8 @@ There are two ways to do it.
239233
buildscript {
240234
repositories {
241235
mavenLocal()
242-
maven {
243-
url "http://[your-ip]:[your-port]/repository/utbot-uber/"
244-
allowInsecureProtocol true
245-
}
246236
mavenCentral()
237+
maven { url 'https://jitpack.io' }
247238
}
248239
&nbsp;
249240
dependencies {
@@ -262,11 +253,8 @@ There are two ways to do it.
262253
buildscript {
263254
repositories {
264255
mavenLocal()
265-
maven {
266-
url = uri("http://[your-ip]:[your-port]/repository/utbot-uber/")
267-
isAllowInsecureProtocol = true
268-
}
269256
mavenCentral()
257+
maven { url 'https://jitpack.io' }
270258
}
271259
&nbsp;
272260
dependencies {

utbot-gradle/src/main/kotlin/org/utbot/sarif/CreateSarifReportTask.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/CreateSarifReportTask.kt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
package org.utbot.sarif
1+
package org.utbot.gradle.plugin
22

3+
import mu.KLogger
4+
import org.gradle.api.DefaultTask
5+
import org.gradle.api.tasks.TaskAction
36
import org.utbot.common.bracket
47
import org.utbot.common.debug
58
import org.utbot.framework.codegen.ForceStaticMocking
@@ -9,18 +12,16 @@ import org.utbot.framework.plugin.api.UtBotTestCaseGenerator
912
import org.utbot.framework.plugin.api.UtTestCase
1013
import org.utbot.framework.plugin.api.util.UtContext
1114
import org.utbot.framework.plugin.api.util.withUtContext
12-
import org.utbot.sarif.extension.SarifGradleExtensionProvider
13-
import org.utbot.sarif.wrappers.GradleProjectWrapper
14-
import org.utbot.sarif.wrappers.SourceFindingStrategyGradle
15-
import org.utbot.sarif.wrappers.SourceSetWrapper
16-
import org.utbot.sarif.wrappers.TargetClassWrapper
15+
import org.utbot.gradle.plugin.extension.SarifGradleExtensionProvider
16+
import org.utbot.gradle.plugin.wrappers.GradleProjectWrapper
17+
import org.utbot.gradle.plugin.wrappers.SourceFindingStrategyGradle
18+
import org.utbot.gradle.plugin.wrappers.SourceSetWrapper
19+
import org.utbot.gradle.plugin.wrappers.TargetClassWrapper
20+
import org.utbot.sarif.SarifReport
1721
import org.utbot.summary.summarize
1822
import java.net.URLClassLoader
1923
import java.nio.file.Path
2024
import javax.inject.Inject
21-
import mu.KLogger
22-
import org.gradle.api.DefaultTask
23-
import org.gradle.api.tasks.TaskAction
2425

2526
/**
2627
* The main class containing the entry point [createSarifReport].
@@ -59,7 +60,7 @@ open class CreateSarifReportTask @Inject constructor(
5960
// internal
6061

6162
// overwriting the getLogger() function from the DefaultTask
62-
private val logger: KLogger = org.utbot.sarif.logger
63+
private val logger: KLogger = org.utbot.gradle.plugin.logger
6364

6465
/**
6566
* Generates tests and a SARIF report for classes in the [gradleProject] and in all its child projects.

utbot-gradle/src/main/kotlin/org/utbot/sarif/SarifGradlePlugin.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/SarifGradlePlugin.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
package org.utbot.sarif
1+
package org.utbot.gradle.plugin
22

3-
import org.utbot.sarif.extension.SarifGradleExtension
4-
import org.utbot.sarif.extension.SarifGradleExtensionProvider
5-
import java.io.File
3+
import mu.KotlinLogging
64
import org.gradle.api.Plugin
75
import org.gradle.api.Project
86
import org.gradle.api.plugins.JavaPluginConvention
97
import org.gradle.api.tasks.SourceSet
108
import org.gradle.api.tasks.TaskProvider
11-
import mu.KotlinLogging
9+
import org.utbot.gradle.plugin.extension.SarifGradleExtension
10+
import org.utbot.gradle.plugin.extension.SarifGradleExtensionProvider
11+
import java.io.File
1212

1313
internal val logger = KotlinLogging.logger {}
1414

utbot-gradle/src/main/kotlin/org/utbot/sarif/extension/SarifGradleExtension.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/extension/SarifGradleExtension.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.utbot.sarif.extension
1+
package org.utbot.gradle.plugin.extension
22

33
import org.gradle.api.provider.ListProperty
44
import org.gradle.api.provider.Property

utbot-gradle/src/main/kotlin/org/utbot/sarif/extension/SarifGradleExtensionProvider.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/extension/SarifGradleExtensionProvider.kt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
package org.utbot.sarif.extension
1+
package org.utbot.gradle.plugin.extension
22

3+
import org.gradle.api.Project
34
import org.utbot.common.PathUtil.toPath
45
import org.utbot.engine.Mocker
5-
import org.utbot.framework.codegen.ForceStaticMocking
6-
import org.utbot.framework.codegen.Junit4
7-
import org.utbot.framework.codegen.Junit5
8-
import org.utbot.framework.codegen.MockitoStaticMocking
9-
import org.utbot.framework.codegen.NoStaticMocking
10-
import org.utbot.framework.codegen.StaticsMocking
11-
import org.utbot.framework.codegen.TestFramework
12-
import org.utbot.framework.codegen.TestNg
6+
import org.utbot.framework.codegen.*
137
import org.utbot.framework.plugin.api.ClassId
148
import org.utbot.framework.plugin.api.CodegenLanguage
159
import org.utbot.framework.plugin.api.MockFramework
1610
import org.utbot.framework.plugin.api.MockStrategyApi
1711
import java.io.File
18-
import org.gradle.api.Project
1912

2013
/**
2114
* Provides all [SarifGradleExtension] fields in a convenient form:

utbot-gradle/src/main/kotlin/org/utbot/sarif/wrappers/GradleProjectWrapper.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/wrappers/GradleProjectWrapper.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package org.utbot.sarif.wrappers
1+
package org.utbot.gradle.plugin.wrappers
22

3-
import org.utbot.common.FileUtil.createNewFileWithParentDirectories
4-
import org.utbot.sarif.extension.SarifGradleExtensionProvider
5-
import java.io.File
6-
import java.nio.file.Paths
73
import org.gradle.api.Project
84
import org.gradle.api.plugins.JavaPluginConvention
95
import org.gradle.api.tasks.SourceSet
6+
import org.utbot.common.FileUtil.createNewFileWithParentDirectories
7+
import org.utbot.gradle.plugin.extension.SarifGradleExtensionProvider
8+
import java.io.File
9+
import java.nio.file.Paths
1010

1111
/**
1212
* Contains information about the gradle project for which we are creating a SARIF report.

utbot-gradle/src/main/kotlin/org/utbot/sarif/wrappers/SourceFindingStrategyGradle.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/wrappers/SourceFindingStrategyGradle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.utbot.sarif.wrappers
1+
package org.utbot.gradle.plugin.wrappers
22

33
import org.utbot.common.PathUtil
44
import org.utbot.common.PathUtil.toPath

utbot-gradle/src/main/kotlin/org/utbot/sarif/wrappers/SourceSetWrapper.kt renamed to utbot-gradle/src/main/kotlin/org/utbot/gradle/plugin/wrappers/SourceSetWrapper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
package org.utbot.sarif.wrappers
1+
package org.utbot.gradle.plugin.wrappers
22

3+
import org.gradle.api.tasks.SourceSet
34
import org.utbot.common.FileUtil.createNewFileWithParentDirectories
45
import org.utbot.common.FileUtil.findAllFilesOnly
56
import org.utbot.common.PathUtil.classFqnToPath
@@ -14,7 +15,6 @@ import java.io.File
1415
import java.net.URLClassLoader
1516
import java.nio.file.Path
1617
import java.nio.file.Paths
17-
import org.gradle.api.tasks.SourceSet
1818

1919
class SourceSetWrapper(
2020
val sourceSet: SourceSet,

0 commit comments

Comments
 (0)