Skip to content

Commit b8b1418

Browse files
committed
removed maven gradle plugin use, replaced by execution of gradle through maven exec
1 parent de6fdc2 commit b8b1418

4 files changed

Lines changed: 61 additions & 101 deletions

File tree

jcp-tests/jcp-test-android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
flatDir dirs: "../../../jcp/target"
55
}
66
dependencies {
7-
classpath "com.igormaznitsa:jcp:7.0.3-SNAPSHOT"
7+
classpath "com.igormaznitsa:jcp:" + project.getProperty("jcp_plugin_version")
88
}
99
}
1010
apply plugin: 'com.igormaznitsa.jcp'
@@ -44,12 +44,12 @@ preprocess {
4444
sources = android.sourceSets.main.java.srcDirs
4545
keepComments = false
4646
vars = [
47-
'action.text':'Non-secret action!',
48-
'remove.secret':'true'
47+
'action.text' : 'Non-secret action!',
48+
'remove.secret': 'true'
4949
]
5050
}
5151

52-
task (changeSourceFolder) {
52+
task(changeSourceFolder) {
5353
android.sourceSets.main.java.srcDirs = [preprocess.target]
5454
}.dependsOn preprocess
5555

jcp-tests/jcp-test-android/pom.xml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@
1212
<artifactId>jcp-test-android</artifactId>
1313
<packaging>pom</packaging>
1414

15-
<dependencies>
16-
<dependency>
17-
<groupId>${project.groupId}</groupId>
18-
<artifactId>jcp-gradle-plugin</artifactId>
19-
<version>${jcp.test.version}</version>
20-
<scope>provided</scope>
21-
</dependency>
22-
</dependencies>
23-
2415
<build>
2516
<plugins>
2617
<plugin>
@@ -76,36 +67,25 @@
7667
</configuration>
7768
</plugin>
7869
<plugin>
79-
<groupId>org.fortasoft</groupId>
80-
<artifactId>gradle-maven-plugin</artifactId>
81-
<version>1.0.8</version>
82-
<dependencies>
83-
<dependency>
84-
<groupId>org.gradle</groupId>
85-
<artifactId>gradle-tooling-api</artifactId>
86-
<version>5.0</version>
87-
<systemPath>${project.basedir}${file.separator}..${file.separator}extlibs${file.separator}gradle-tooling-api-5.0.jar</systemPath>
88-
<scope>system</scope>
89-
</dependency>
90-
</dependencies>
91-
92-
<configuration>
93-
<gradleVersion>5.0</gradleVersion>
94-
<args>
95-
<arg>--stacktrace</arg>
96-
<arg>--info</arg>
97-
</args>
98-
<tasks>
99-
<task>clean</task>
100-
<task>test</task>
101-
<task>build</task>
102-
</tasks>
103-
</configuration>
70+
<groupId>org.codehaus.mojo</groupId>
71+
<artifactId>exec-maven-plugin</artifactId>
10472
<executions>
10573
<execution>
74+
<id>gradle</id>
10675
<phase>compile</phase>
76+
<configuration>
77+
<executable>${gradle.executable}</executable>
78+
<arguments>
79+
<argument>clean</argument>
80+
<argument>test</argument>
81+
<argument>build</argument>
82+
<argument>-i</argument>
83+
<argument>-S</argument>
84+
<argument>-Pjcp_plugin_version=${jcp.test.version}</argument>
85+
</arguments>
86+
</configuration>
10787
<goals>
108-
<goal>invoke</goal>
88+
<goal>exec</goal>
10989
</goals>
11090
</execution>
11191
</executions>

jcp-tests/jcp-test-gradle/pom.xml

Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
<packaging>pom</packaging>
1414

1515
<dependencies>
16-
<dependency>
17-
<groupId>${project.groupId}</groupId>
18-
<artifactId>jcp-gradle-plugin</artifactId>
19-
<version>${jcp.test.version}</version>
20-
<scope>provided</scope>
21-
</dependency>
2216
<dependency>
2317
<groupId>junit</groupId>
2418
<artifactId>junit</artifactId>
@@ -63,57 +57,26 @@
6357
</plugin>
6458
<plugin>
6559
<groupId>org.codehaus.mojo</groupId>
66-
<artifactId>properties-maven-plugin</artifactId>
67-
<version>1.0.0</version>
60+
<artifactId>exec-maven-plugin</artifactId>
6861
<executions>
6962
<execution>
70-
<goals>
71-
<goal>set-system-properties</goal>
72-
</goals>
63+
<id>gradle</id>
64+
<phase>compile</phase>
7365
<configuration>
74-
<properties>
75-
<property>
76-
<name>gradle.prop.jcp_plugin_path</name>
77-
<value>${project.basedir}${file.separator}..${file.separator}..${file.separator}jcp-gradle-plugin${file.separator}build${file.separator}libs${file.separator}jcp-gradle-plugin-${jcp.test.version}.jar</value>
78-
</property>
79-
</properties>
66+
<executable>${gradle.executable}</executable>
67+
<arguments>
68+
<argument>clean</argument>
69+
<argument>test</argument>
70+
<argument>jar</argument>
71+
<argument>-i</argument>
72+
<argument>-S</argument>
73+
<argument>
74+
-Pjcp_plugin_path=${project.basedir}${file.separator}..${file.separator}..${file.separator}jcp-gradle-plugin${file.separator}build${file.separator}libs${file.separator}jcp-gradle-plugin-${jcp.test.version}.jar
75+
</argument>
76+
</arguments>
8077
</configuration>
81-
</execution>
82-
</executions>
83-
</plugin>
84-
<plugin>
85-
<groupId>org.fortasoft</groupId>
86-
<artifactId>gradle-maven-plugin</artifactId>
87-
<version>1.0.8</version>
88-
<dependencies>
89-
<dependency>
90-
<groupId>org.gradle</groupId>
91-
<artifactId>gradle-tooling-api</artifactId>
92-
<version>5.1</version>
93-
<systemPath>
94-
${project.basedir}${file.separator}..${file.separator}extlibs${file.separator}gradle-tooling-api-5.1.jar
95-
</systemPath>
96-
<scope>system</scope>
97-
</dependency>
98-
</dependencies>
99-
100-
<configuration>
101-
<gradleVersion>5.0</gradleVersion>
102-
<args>
103-
<arg>--stacktrace</arg>
104-
<arg>--info</arg>
105-
</args>
106-
<tasks>
107-
<task>clean</task>
108-
<task>test</task>
109-
<task>jar</task>
110-
</tasks>
111-
</configuration>
112-
<executions>
113-
<execution>
114-
<phase>compile</phase>
11578
<goals>
116-
<goal>invoke</goal>
79+
<goal>exec</goal>
11780
</goals>
11881
</execution>
11982
</executions>

jcp-tests/pom.xml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<junit.version>5.4.2</junit.version>
1313
<maven.compiler.source>1.8</maven.compiler.source>
1414
<maven.compiler.target>1.8</maven.compiler.target>
15+
<gradle.executable>gradle</gradle.executable>
1516
</properties>
1617

1718
<modules>
@@ -35,17 +36,33 @@
3536
</profile>
3637
</profiles>
3738

39+
<dependencyManagement>
40+
<dependencies>
41+
<dependency>
42+
<groupId>org.codehaus.mojo</groupId>
43+
<artifactId>exec-maven-plugin</artifactId>
44+
<version>1.6.0</version>
45+
</dependency>
46+
</dependencies>
47+
</dependencyManagement>
48+
3849
<dependencies>
39-
<dependency>
40-
<groupId>org.junit.jupiter</groupId>
41-
<artifactId>junit-jupiter-engine</artifactId>
42-
<version>${junit.version}</version>
43-
<scope>test</scope>
44-
</dependency>
45-
<dependency>
46-
<groupId>org.junit.jupiter</groupId>
47-
<artifactId>junit-jupiter-api</artifactId>
48-
<version>${junit.version}</version>
50+
<dependency>
51+
<groupId>com.igormaznitsa</groupId>
52+
<artifactId>jcp</artifactId>
53+
<version>${jcp.test.version}</version>
54+
<scope>provided</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.junit.jupiter</groupId>
58+
<artifactId>junit-jupiter-engine</artifactId>
59+
<version>${junit.version}</version>
60+
<scope>test</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.junit.jupiter</groupId>
64+
<artifactId>junit-jupiter-api</artifactId>
65+
<version>${junit.version}</version>
4966
<scope>test</scope>
5067
</dependency>
5168
</dependencies>

0 commit comments

Comments
 (0)