mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
Remove old and deprecated compile configuration + some minor refactoring
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
@@ -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,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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user