Skip to content

Commit

Permalink
Merge pull request #69 from IntershopCommunicationsAG/71762-RemoveISM…
Browse files Browse the repository at this point in the history
…LDependency

#71762: Removed ISML-dependency
  • Loading branch information
m-raab authored Dec 13, 2021
2 parents f6c00c3 + 5d44579 commit c73a86d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 31 deletions.
12 changes: 8 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ pluginBundle {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

// set correct project status
Expand Down Expand Up @@ -299,6 +299,7 @@ publishing {
}
}
repositories {

maven {
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
Expand All @@ -320,8 +321,11 @@ dependencies {
implementation(localGroovy())

compileOnly("org.apache.ant:ant:1.10.7")
implementation("com.intershop.gradle.isml:isml-gradle-plugin:4.1.4")


testImplementation("com.intershop.gradle.test:test-gradle-plugin:4.1.1")
testImplementation(gradleTestKit())

repositories {
mavenLocal()
}
}
21 changes: 1 addition & 20 deletions src/main/kotlin/com/intershop/gradle/icm/ICMBasePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import com.intershop.gradle.icm.tasks.CreateServerInfo
import com.intershop.gradle.icm.tasks.CreateTestPackage
import com.intershop.gradle.icm.tasks.WriteCartridgeDescriptor
import com.intershop.gradle.icm.utils.EnvironmentType
import com.intershop.gradle.isml.IsmlPlugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.file.CopySpec
Expand Down Expand Up @@ -161,9 +160,7 @@ open class ICMBasePlugin: Plugin<Project> {
}
}
// root.assemble dependsOn collectLibrariesTask
project.tasks.named(BasePlugin.ASSEMBLE_TASK_NAME).configure { rootAssemble ->
rootAssemble.dependsOn(collectLibrariesTask)
}
project.tasks.named(BasePlugin.ASSEMBLE_TASK_NAME).get().dependsOn(collectLibrariesTask)

return collectLibrariesTask
}
Expand All @@ -182,12 +179,6 @@ open class ICMBasePlugin: Plugin<Project> {
}
}

sub.plugins.withType(IsmlPlugin::class.java) {
cp.from(sub.tasks.getByName("isml2classMain")) { cpt ->
intoRelease(cpt, sub)
}
}

sub.plugins.withType(JavaPlugin::class.java) {
cp.from(sub.tasks.getByName("jar")) { cps ->
cps.into("cartridges/${sub.name}/release/lib")
Expand All @@ -196,23 +187,14 @@ open class ICMBasePlugin: Plugin<Project> {
}

sub.plugins.withType(ProductPlugin::class.java) {
sub.plugins.withType(IsmlPlugin::class.java) {
createMainPackage.configure { mainpkg -> pkgDependsOn(mainpkg, sub) }
}
createMainPackage.configure { mainpkg -> mainpkg.with(cartridgefiles) }
}

sub.plugins.withType(ContainerPlugin::class.java) {
sub.plugins.withType(IsmlPlugin::class.java) {
createMainPackage.configure { mainpkg -> pkgDependsOn(mainpkg, sub) }
}
createMainPackage.configure { mainpkg -> mainpkg.with(cartridgefiles) }
}

sub.plugins.withType(TestPlugin::class.java) {
sub.plugins.withType(IsmlPlugin::class.java) {
createTestPackage.configure { testpkg -> pkgDependsOn(testpkg, sub) }
}
createTestPackage.configure { testpkg -> testpkg.with(cartridgefiles) }
}
}
Expand All @@ -231,7 +213,6 @@ open class ICMBasePlugin: Plugin<Project> {
private fun intoRelease(cpsp: CopySpec, prj: Project) = cpsp.into("cartridges/${prj.name}/release")

private fun pkgDependsOn(tar: Tar, prj: Project) {
tar.dependsOn(prj.tasks.named("isml2classMain"))
tar.dependsOn(prj.tasks.named("jar"))
}
}
7 changes: 0 additions & 7 deletions src/main/kotlin/com/intershop/gradle/icm/ICMProjectPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import com.intershop.gradle.icm.utils.CartridgeStyle.valueOf
import com.intershop.gradle.icm.utils.EnvironmentType.DEVELOPMENT
import com.intershop.gradle.icm.utils.EnvironmentType.PRODUCTION
import com.intershop.gradle.icm.utils.EnvironmentType.TEST
import com.intershop.gradle.isml.IsmlPlugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
Expand Down Expand Up @@ -126,12 +125,6 @@ open class ICMProjectPlugin @Inject constructor(private var projectLayout: Proje
prepareContainer.configure { task -> task.dependsOn(jarTask) }
}
}
sub.plugins.withType(IsmlPlugin::class.java) {
val ismlTask = sub.tasks.getByName("isml2classMain")
prepareServer.configure { task -> task.dependsOn(ismlTask) }
prepareTestContainer.configure { task -> task.dependsOn(ismlTask) }
prepareContainer.configure { task -> task.dependsOn(ismlTask) }
}
}
}

Expand Down

0 comments on commit c73a86d

Please sign in to comment.