Remove old and deprecated compile configuration + some minor refactoring

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
solonovamax
2021-05-01 16:45:52 -04:00
parent 4c1e1bb7d5
commit aa9e33af1d
4 changed files with 6 additions and 6 deletions
@@ -7,10 +7,6 @@ import org.gradle.kotlin.dsl.withType
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
fun Project.configureCommon() { fun Project.configureCommon() {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "idea")
configureDependencies() configureDependencies()
configureCompilation() configureCompilation()
configureDistribution() configureDistribution()
@@ -10,6 +10,9 @@ import org.gradle.kotlin.dsl.*
import org.gradle.language.jvm.tasks.ProcessResources import org.gradle.language.jvm.tasks.ProcessResources
fun Project.configureCompilation() { fun Project.configureCompilation() {
apply(plugin = "maven-publish")
apply(plugin = "idea")
configure<JavaPluginConvention> { configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
@@ -1,15 +1,17 @@
package com.dfsek.terra package com.dfsek.terra
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.invoke import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.repositories import org.gradle.kotlin.dsl.repositories
fun Project.configureDependencies() { fun Project.configureDependencies() {
apply(plugin = "java")
apply(plugin = "java-library")
configurations { configurations {
val shaded = create("shaded") val shaded = create("shaded")
getByName("compile").extendsFrom(shaded)
val shadedApi = create("shadedApi") val shadedApi = create("shadedApi")
shaded.extendsFrom(shadedApi) shaded.extendsFrom(shadedApi)
getByName("api").extendsFrom(shadedApi) getByName("api").extendsFrom(shadedApi)
-1
View File
@@ -1,4 +1,3 @@
import com.dfsek.terra.configureCommon
import com.dfsek.terra.configureCompilation import com.dfsek.terra.configureCompilation
import com.dfsek.terra.configureDependencies import com.dfsek.terra.configureDependencies