misc: change package to compat and make maven-local be able

This commit is contained in:
2025-05-08 17:32:17 +08:00
parent 82a02d879e
commit d9f0355f0c
84 changed files with 406 additions and 22941 deletions

View File

@@ -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()) {