mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-05 10:15:19 +08:00
misc: change package to compat and make maven-local be able
This commit is contained in:
20
build.gradle
20
build.gradle
@@ -2,15 +2,8 @@
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
// apply plugin: 'jacoco'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
//plugins {
|
||||
// id 'java'
|
||||
//id 'maven-publish'
|
||||
// }
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -25,12 +18,8 @@ dependencies {
|
||||
testImplementation 'org.mockito:mockito-core:4.2.0'
|
||||
}
|
||||
|
||||
subprojects {
|
||||
tasks.withType(Javadoc).all { enabled = false }
|
||||
}
|
||||
|
||||
group = 'org.json'
|
||||
version = 'v20250107-SNAPSHOT'
|
||||
group = 'org.json.compat'
|
||||
version = 'v20250107-local'
|
||||
description = 'JSON in Java'
|
||||
sourceCompatibility = '1.8'
|
||||
|
||||
@@ -45,6 +34,7 @@ java {
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
artifactId = 'json'
|
||||
from(components.java)
|
||||
}
|
||||
}
|
||||
@@ -66,7 +56,7 @@ task modifyStrictMode {
|
||||
doLast {
|
||||
println "Modifying JSONParserConfiguration.java to enable strictMode..."
|
||||
|
||||
def filePath = project.file('src/main/java/org/json/JSONParserConfiguration.java')
|
||||
def filePath = project.file('src/main/java/org/json/compat/JSONParserConfiguration.java')
|
||||
|
||||
if (!filePath.exists()) {
|
||||
throw new GradleException("Could not find file: ${filePath.absolutePath}")
|
||||
@@ -92,7 +82,7 @@ task restoreStrictMode {
|
||||
doLast {
|
||||
println "Restoring original JSONParserConfiguration.java..."
|
||||
|
||||
def filePath = project.file('src/main/java/org/json/JSONParserConfiguration.java')
|
||||
def filePath = project.file('src/main/java/org/json/compat/JSONParserConfiguration.java')
|
||||
def backupFile = new File(filePath.absolutePath + '.bak')
|
||||
|
||||
if (backupFile.exists()) {
|
||||
|
Reference in New Issue
Block a user