-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for gradle 8 (#280)
- Loading branch information
1 parent
e216d5c
commit a121cc1
Showing
38 changed files
with
253 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 21 additions & 29 deletions
50
test/fixtures/custom-resolution-strategy-via-all/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,47 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
|
||
group = 'com.github.jitpack' | ||
version = '1.0.0' | ||
|
||
sourceCompatibility = 1.8 // java 8 | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile 'commons-discovery:commons-discovery:0.2' | ||
compile 'axis:axis:1.3' | ||
implementation 'commons-discovery:commons-discovery:0.2' | ||
implementation 'axis:axis:1.3' | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
if (project.gradle.gradleVersion >= '6.3') { | ||
archiveClassifier.set('sources') | ||
} else { | ||
classifier = 'sources' | ||
} | ||
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
if (project.gradle.gradleVersion >= '6.3') { | ||
archiveClassifier.set('javadoc') | ||
} else { | ||
classifier = 'javadoc' | ||
} | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
archives tasks.sourcesJar | ||
archives tasks.javadocJar | ||
} | ||
|
||
// To specify a license in the pom: | ||
install { | ||
repositories.mavenInstaller { | ||
pom.project { | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html#sec:dependency_resolve_rules | ||
configurations.all { | ||
resolutionStrategy.eachDependency { details -> | ||
if (details.requested.group == 'commons-logging' && details.requested.name == 'commons-logging') { | ||
details.useVersion '1.0.3' | ||
resolutionStrategy.eachDependency { details -> | ||
if (details.requested.group == 'commons-logging' && details.requested.name == 'commons-logging') { | ||
details.useVersion '1.0.3' | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
import org.gradle.api.JavaVersion | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
val kotlinVersion = "1.3.21" | ||
id("org.jetbrains.kotlin.jvm") version kotlinVersion | ||
id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion | ||
id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion | ||
val kotlinVersion = if (JavaVersion.current().toString() >= "17") "1.8.10" else "1.3.21" | ||
kotlin("jvm") version kotlinVersion | ||
kotlin("plugin.spring") version kotlinVersion | ||
kotlin("plugin.jpa") version kotlinVersion | ||
} | ||
|
||
version = "1.0.0-SNAPSHOT" | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
freeCompilerArgs = listOf("-Xjsr305=strict") | ||
} | ||
doFirst { | ||
if (JavaVersion.current().isJava8Compatible()) { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} else { | ||
kotlinOptions.jvmTarget = "17" | ||
} | ||
kotlinOptions.freeCompilerArgs = listOf("-Xjsr305=strict") | ||
} | ||
} | ||
|
||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
useJUnitPlatform() | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// Removed Spring because too heavy | ||
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
testCompile("org.jetbrains.kotlin:kotlin-reflect") { | ||
exclude(module = "junit") | ||
} | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
testImplementation("org.jetbrains.kotlin:kotlin-reflect") { | ||
exclude(module = "junit") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
|
||
group = 'com.github.jitpack' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.