diff --git a/.gitignore b/.gitignore
index 6c3cd331f6..8c3473df30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,4 +30,11 @@ codesigning.jks
/prov/src/main/core/
-bc-build.user.properties
\ No newline at end of file
+bc-build.user.properties
+/core/target/
+/pkix/target/
+/prov/target/
+/mail/target/
+/util/target/
+/pg/target/
+/tls/target/
diff --git a/bom/build.gradle b/bom/build.gradle
deleted file mode 100644
index b8b528cc8f..0000000000
--- a/bom/build.gradle
+++ /dev/null
@@ -1,55 +0,0 @@
-plugins {
- id("java-platform")
- id("maven-publish")
-}
-
-
-dependencies {
- constraints {
- api(project(":prov"))
- api(project(":util"))
- api(project(":pkix"))
- api(project(":pg"))
- api(project(":tls"))
- api(project(":mls"))
- api(project(":mail"))
- api(project(":jmail"))
- }
-}
-
-
-publishing {
- publications {
- mavenJava(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bc-$vmrange-bom"
- from components.javaPlatform
- pom {
- name = "Bouncy Castle Java 8+ 1.82 (Bill of Materials)"
- description = "This Bill of Materials POM can be used to ease dependency management when referencing multiple Bouncy Castle artifacts using Gradle or Maven."
- url = 'https://www.bouncycastle.org/download/bouncy-castle-java/'
- licenses {
- license {
- name = 'Bouncy Castle Licence'
- url = 'https://www.bouncycastle.org/licence.html'
- distribution = 'repo'
- }
- }
- scm {
- url = 'https://github.com/bcgit/bc-java'
- }
- issueManagement {
- system = 'GitHub'
- url = 'https://github.com/bcgit/bc-java/issues'
- }
- developers {
- developer {
- id = 'feedback-crypto'
- name = 'The Legion of the Bouncy Castle Inc.'
- email = 'feedback-crypto@bouncycastle.org'
- }
- }
- }
- }
- }
-}
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 8fb085d18a..0000000000
--- a/build.gradle
+++ /dev/null
@@ -1,296 +0,0 @@
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
-
-}
-
-
-plugins {
- id "io.spring.nohttp" version "0.0.11"
- id "checkstyle"
- id "jacoco"
- id "net.ltgt.errorprone" version "3.1.0"
- id 'maven-publish'
-}
-
-println("Environment setup:")
-["BC_JDK8", "BC_JDK11", "BC_JDK17"].each({ it ->
- println("Looking for JDK ENV '${it}' found ${System.getenv(it)}");
-// if (System.getenv(it) == null) {
-// throw new RuntimeException("Looking for JDK ENV '${it}' but found null, see README 'Environmental variables'");
-// }
-})
-
-
-if (JavaVersion.current().isJava8Compatible()) {
- allprojects {
- tasks.withType(Javadoc) {
- options.addStringOption('Xdoclint:none', '-quiet')
- }
- }
-}
-
-def String deriveOSGIVersion(String prjVersion) {
- if (prjVersion.contains("-SNAPSHOT")) {
- // Snapshots always extend to fourth level and terminate with time in seconds since epoch.
- prjVersion = prjVersion.replace("-SNAPSHOT", "");
- while (prjVersion.count(".") < 2) {
- prjVersion = prjVersion + ".0";
- }
- prjVersion = prjVersion + "." + System.currentTimeMillis().intdiv(1000L).intdiv(60).intdiv(60).intdiv(24);
- }
- return prjVersion
-}
-
-ext {
- bundle_version = deriveOSGIVersion(version.toString());
-}
-
-
-// this needs to go here, otherwise it can't find config
-apply plugin: 'io.spring.nohttp'
-
-configure(allprojects.findAll {it.name != 'bom'}) {
- apply plugin: 'java'
- apply plugin: 'idea'
- apply plugin: 'checkstyle'
- apply plugin: 'jacoco'
- apply plugin: 'net.ltgt.errorprone'
-
- repositories {
- mavenCentral()
- }
-
- dependencies {
- testImplementation group: 'junit', name: 'junit', version: '4.13.2'
- }
- tasks.withType(JavaCompile).configureEach {
- options.errorprone {
- // Checks that cannot be enabled because implementing their suggestions
- // would break backward compatibility.
- check('ComparableType', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('JdkObsolete', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
-
- // ERROR
- check('BadShiftAmount', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('BanJNDI', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('BoxedPrimitiveEquality', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ChainingConstructorIgnoresParameter', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ConstantOverflow', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('EqualsHashCode', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('EqualsNull', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('HashtableContains', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ReturnValueIgnored', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('SelfEquals', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
-
- // WARNING
- check('AlmostJavadoc', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('AlreadyChecked', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('AmbiguousMethodReference', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('AssertionFailureIgnored', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('BadImport', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('BadInstanceof', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('BoxedPrimitiveConstructor', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('CanIgnoreReturnValueSuggester', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('CatchAndPrintStackTrace', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('CatchFail', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ClassNewInstance', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('CompareToZero', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('DefaultCharset', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('DoubleBraceInitialization', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('EmptyBlockTag', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('EmptyCatch', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('EqualsGetClass', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('EqualsIncompatibleType', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ErroneousBitwiseExpression', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('FallThrough', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('FloatingPointLiteralPrecision', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('HidingField', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InconsistentCapitalization', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InconsistentHashCode', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('IncrementInForLoopAndHeader', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InputStreamSlowMultibyteRead', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InstanceOfAndCastMatchWrongType', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('IntLongMath', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InvalidBlockTag', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InvalidInlineTag', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InvalidParam', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('InvalidThrows', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('IsInstanceIncompatibleType', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('IsInstanceOfClass', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('JavaLangClash', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('JavaUtilDate', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MalformedInlineTag', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MathAbsoluteRandom', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MissingCasesInEnumSwitch', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MissingFail', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MissingImplementsComparable', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MissingOverride', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MissingSummary', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MixedMutabilityReturnType', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ModifiedButNotUsed', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('MutablePublicArray', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('NarrowCalculation', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('NarrowingCompoundAssignment', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('NestedInstanceOfConditions', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('NonAtomicVolatileUpdate', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('NonOverridingEquals', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('OperatorPrecedence', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ProtectedMembersInFinalClass', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ReferenceEquality', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ReturnFromVoid', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ShortCircuitBoolean', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('StringSplitter', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('SynchronizeOnNonFinalField', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ThreadLocalUsage', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('ThreadPriorityCheck', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('TypeParameterUnusedInFormals', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UndefinedEquals', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnescapedEntity', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnicodeEscape', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnnecessaryParentheses', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnrecognisedJavadocTag', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnsynchronizedOverridesSynchronized', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnusedMethod', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnusedNestedClass', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UnusedVariable', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('UseCorrectAssertInTests', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- check('VariableNameSameAsType', net.ltgt.gradle.errorprone.CheckSeverity.OFF)
- }
- }
-
-
-}
-
-task printProperties {
- doLast {
- println bcTestDataHome
- }
-}
-
-ext {
- bcTestDataHome = file('core/src/test/data').absolutePath
-
- JavaVersion current = JavaVersion.current();
- if (current.compareTo(JavaVersion.VERSION_1_8) <= 0) {
- ext.vmrange = 'jdk15to18'
- } else {
- ext.vmrange = 'jdk18on'
- }
-
-}
-
-configure(subprojects.findAll {it.name != 'bom'}) {
- apply plugin: 'eclipse'
- apply plugin: 'maven-publish'
-
-
- JavaVersion current = JavaVersion.current();
- int releaseVersion = 8;
- if (current.compareTo(JavaVersion.VERSION_1_8) <= 0) {
- releaseVersion = 5
- }
-
- compileJava {
- options.release = releaseVersion;
- }
-
- compileTestJava {
- options.release = 8;
- }
-
-
- task testFull(type: Test) {
- systemProperties = [
- 'bc.test.data.home': bcTestDataHome,
- 'test.full' : 'true'
- ]
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- }
- }
-
- test {
- forkEvery = 1;
- maxParallelForks = 1;
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- jvmArgs = ['-Dtest.java.version.prefix=any']
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
- }
-
-
-
- dependencies {
- checkstyle files("$rootDir/config/checkstyle/lib/methodchecker-1.0.0.jar")
- checkstyle 'com.puppycrawl.tools:checkstyle:9.0'
- errorprone "com.google.errorprone:error_prone_core:2.24.1"
- }
-
- checkstyle {
- configFile file("$rootDir/config/checkstyle/checkstyle.xml");
- toolVersion '9.0'; // your choice here
- sourceSets = [project.sourceSets.main]
- }
-
- nohttp {
- source.exclude '**/*.asc'
- source.exclude '**/*.class'
- source.exclude '**/*.crt'
- source.exclude '**/*.crl'
- source.exclude '**/*.eml'
- source.exclude '**/*.gpg'
- source.exclude '**/*.jar'
- source.exclude '**/*.message'
- source.exclude '**/*.pem'
- source.exclude '**/*.*pub'
- source.exclude '**/*.rsp'
- source.exclude 'out/*'
- }
-
- jacocoTestReport {
- dependsOn test // tests are required to run before generating the report
- }
-
- jacoco {
- reportsDirectory = layout.buildDirectory.dir("jacoco")
- }
-
- tasks.withType(JavaCompile).configureEach {
- options.debug = true;
- }
-
- tasks.withType(Test).configureEach {
- reports {
- junitXml.outputLocation = layout.buildDirectory.dir("test-results")
- }
- }
-
-}
-
-
-test.dependsOn([':core:test', ':prov:test', ':prov:test11', ':prov:test15', ':prov:test21', ':pkix:test', 'pg:test', ':tls:test', 'mls:test', 'mail:test', 'jmail:test'])
-
-apply from: "publish.gradle"
-
-
-
-
diff --git a/core/build.gradle b/core/build.gradle
deleted file mode 100644
index acc707d315..0000000000
--- a/core/build.gradle
+++ /dev/null
@@ -1,55 +0,0 @@
-apply plugin: 'application'
-
-dependencies {
- implementation group: 'org.openjdk.jmh', name: 'jmh-core', version: '1.33'
- annotationProcessor group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.33'
-}
-application {
- mainClass.set("org.bouncycastle.crypto.fpe.SP80038GMicroBenchmark")
-}
-
-jar.archiveBaseName = "bccore-$vmrange"
-
-test {
- forkEvery = 1;
- maxParallelForks = 8;
- jvmArgs = ['-Dtest.java.version.prefix=any']
-}
-
-compileJava {
- options.release = 8
-}
-
-task sourcesJar(type: Jar) {
- archiveBaseName="bccore"
- archiveAppendix="${vmrange}"
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- exclude("**/*.so")
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName="bccore"
- archiveAppendix="${vmrange}"
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bccore-$vmrange"
- from components.java
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
- }
-}
diff --git a/core/pom.xml b/core/pom.xml
new file mode 100644
index 0000000000..1251fdee33
--- /dev/null
+++ b/core/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ core
+ jar
+
+ 1.8
+ 1.8
+
+ bc : core
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index 0c7f741a2d..0000000000
--- a/gradle.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-org.gradle.jvmargs=-Xmx2g
-version=1.83-SNAPSHOT
-maxVersion=1.84
-org.gradle.java.installations.auto-detect=false
-org.gradle.java.installations.auto-download=false
-org.gradle.java.installations.fromEnv=BC_JDK8,BC_JDK11,BC_JDK17
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index d64cd49177..0000000000
Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index a4413138c9..0000000000
--- a/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
-networkTimeout=10000
-validateDistributionUrl=true
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
deleted file mode 100755
index 1aa94a4269..0000000000
--- a/gradlew
+++ /dev/null
@@ -1,249 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright © 2015-2021 the original authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
-##############################################################################
-
-# Attempt to set APP_HOME
-
-# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
-done
-
-# This is normally unused
-# shellcheck disable=SC2034
-APP_BASE_NAME=${0##*/}
-# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
-
-warn () {
- echo "$*"
-} >&2
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-} >&2
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD=java
- if ! command -v java >/dev/null 2>&1
- then
- die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-fi
-
-# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC2039,SC3045
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC2039,SC3045
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
-fi
-
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
-
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
- done
-fi
-
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Collect all arguments for the java command:
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
-# and any embedded shellness will be escaped.
-# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
-# treated as '${Hostname}' itself on the command line.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Stop when "xargs" is not available.
-if ! command -v xargs >/dev/null 2>&1
-then
- die "xargs is not available"
-fi
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
-
-exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 93e3f59f13..0000000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,92 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if %ERRORLEVEL% equ 0 goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/jmail/build.gradle b/jmail/build.gradle
deleted file mode 100644
index 25d983c511..0000000000
--- a/jmail/build.gradle
+++ /dev/null
@@ -1,136 +0,0 @@
-
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-jar.archiveBaseName = "bcjmail-$vmrange"
-
-sourceSets {
- main {
- java {
- srcDirs = ['build/src/main/java']
- }
- }
-
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-
-}
-
-dependencies {
- implementation project(':prov')
- implementation project(':util')
- implementation project(':pkix')
-
- implementation group: 'jakarta.mail', name: 'jakarta.mail-api', version: '2.0.1'
- implementation group: 'jakarta.activation', name: 'jakarta.activation-api', version: '2.0.0'
-
- java9Implementation files(sourceSets.main.output.classesDirs) {
- builtBy compileJava
- }
-}
-
-evaluationDependsOn(":prov")
-evaluationDependsOn(":util")
-evaluationDependsOn(":pkix")
-
-task copyTask(type: Copy) {
- duplicatesStrategy = 'include'
- from '../mail/src/main'
- from 'src/main'
- into 'build/src/main'
- filter { String line -> (line.contains('javax.mail') || line.contains('javax.activation')) ? line.replace('javax.mail', 'jakarta.mail').replace('javax.activation', 'jakarta.activation') : line }
-}
-
-compileJava.dependsOn(copyTask)
-processResources.dependsOn(copyTask)
-
-
-compileJava {
- options.release = 8
-}
-
-
-compileJava9Java {
-
- options.release = 9
-
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
- def util_jar="${project(":util").jar.outputs.files.getFiles().getAt(0)}"
- def pkix_jar="${project(":pkix").jar.outputs.files.getFiles().getAt(0)}"
-
- options.compilerArgs += [
- '--module-path', "$prov_jar${File.pathSeparator}$util_jar${File.pathSeparator}$pkix_jar${File.pathSeparator}${rootProject.projectDir}/libs/jakarta.mail-2.0.1.jar${File.pathSeparator}${rootProject.projectDir}/libs/jakarta.activation-api-2.0.0.jar"
- ]
- options.sourcepath = files(['build/src/main/java', 'src/main/jdk1.9'])
-
-}
-
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bcjmail')
- manifest.attributes('Bundle-SymbolicName': 'bcjmail')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "org.bouncycastle.mail.*;version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,jakarta.*;resolution:=optional,!org.bouncycastle.mail.*,org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-task sourcesJar(type: Jar) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
-}
-
-sourcesJar.dependsOn(copyTask)
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-test {
- forkEvery = 1;
- maxParallelForks = 8;
-}
-
-compileJava9Java.dependsOn([":prov:jar", ":util:jar",":pkix:jar"])
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcjmail-$vmrange"
- from components.java
-
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
- }
-}
diff --git a/mail/build.gradle b/mail/build.gradle
deleted file mode 100644
index 02fd9d837d..0000000000
--- a/mail/build.gradle
+++ /dev/null
@@ -1,116 +0,0 @@
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-jar.archiveBaseName = "bcmail-$vmrange"
-
-sourceSets {
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-}
-
-dependencies {
- implementation project(':prov')
- implementation project(':util')
- implementation project(':pkix')
-
- implementation group: 'javax.mail', name: 'mail', version: '1.4'
-
- java9Implementation files(sourceSets.main.output.classesDirs) {
- builtBy compileJava
- }
-}
-
-evaluationDependsOn(":prov")
-evaluationDependsOn(":util")
-evaluationDependsOn(":pkix")
-
-compileJava {
-
- options.release = 8
-}
-
-
-compileJava9Java {
-
- options.release = 9
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
- def util_jar="${project(":util").jar.outputs.files.getFiles().getAt(0)}"
- def pkix_jar="${project(":pkix").jar.outputs.files.getFiles().getAt(0)}"
-
- options.compilerArgs += [
- '--module-path', "${prov_jar}${File.pathSeparator}${util_jar}${File.pathSeparator}${pkix_jar}"
- ]
-
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.9'])
-}
-
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bcmail')
- manifest.attributes('Bundle-SymbolicName': 'bcmail')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "org.bouncycastle.mail.*;version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,!org.bouncycastle.mail.*,org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-task sourcesJar(type: Jar) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
-}
-
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-test {
- forkEvery = 1;
- maxParallelForks = 8;
- jvmArgs = ['-Dtest.java.version.prefix=any']
-}
-
-compileJava9Java.dependsOn([":prov:jar", ":util:jar",":pkix:jar"])
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcmail-$vmrange"
- from components.java
-
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
-
- }
-}
diff --git a/mail/pom.xml b/mail/pom.xml
new file mode 100644
index 0000000000..6559b5f727
--- /dev/null
+++ b/mail/pom.xml
@@ -0,0 +1,36 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ mail
+ jar
+
+ 1.8
+ 1.8
+
+ bc : mail
+
+
+ ${project.groupId}
+ pkix
+ ${project.version}
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+ javax.mail
+ mail
+ 1.4.7
+ jar
+
+
+
\ No newline at end of file
diff --git a/mls/build.gradle b/mls/build.gradle
deleted file mode 100644
index dea80e8563..0000000000
--- a/mls/build.gradle
+++ /dev/null
@@ -1,216 +0,0 @@
-
-plugins {
-// OSGI
- id "biz.aQute.bnd.builder" version "7.0.0"
-// Provide convenience executables for trying out the examples.
- id 'application'
- id 'com.google.protobuf' version '0.9.4'
-// Generate IntelliJ IDEA's .idea & .iml project files
-// id 'idea'
-}
-
-apply plugin: 'java'
-apply plugin: 'com.google.protobuf'
-
-sourceSets {
-
- main {
- java {
- srcDirs 'build/generated/source/proto/main/grpc'
- srcDirs 'build/generated/source/proto/main/java'
- }
- }
-
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-}
-
-dependencies {
- implementation project(':util')
- implementation project(':pkix')
- implementation project(':prov')
-
- //Provided
- implementation(files("../test/libs/annotations-api-6.0.53.jar"))
-// implementation(files("../test/libs/protobuf-java-util-3.22.3.jar"))
- implementation(files("../test/libs/guava-32.0.1-android.jar"))
- implementation(files("../test/libs/grpc-stub-1.58.0.jar"))
- implementation(files("../test/libs/protobuf-java-3.22.3.jar"))
- implementation(files("../test/libs/grpc-api-1.58.0.jar"))
- implementation(files("../test/libs/grpc-protobuf-lite-1.58.0.jar"))
- implementation(files("../test/libs/failureaccess-1.0.1.jar"))
- implementation(files("../test/libs/grpc-protobuf-1.58.0.jar"))
-
- //Compile
- compileOnly(files("../test/libs/grpc-services-1.58.0.jar"))
-
- //Runtime
- runtimeOnly(files("../test/libs/grpc-netty-shaded-1.58.0.jar"))
- runtimeOnly(files("../test/libs/grpc-core-1.58.0.jar"))
- runtimeOnly(files("../test/libs/perfmark-api-0.26.0.jar"))
-
- //Download jars online
-// implementation "io.grpc:grpc-protobuf:${grpcVersion}"
-// implementation "io.grpc:grpc-services:${grpcVersion}"
-// implementation "io.grpc:grpc-stub:${grpcVersion}"
-// compileOnly "org.apache.tomcat:annotations-api:6.0.53"
-// runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
-// implementation "com.google.protobuf:protobuf-java-util:${protocVersion}"
- java9Implementation files(sourceSets.main.output.classesDirs) {
- builtBy compileJava
- }
-}
-
-evaluationDependsOn(":prov")
-evaluationDependsOn(":util")
-evaluationDependsOn(":pkix")
-
-def grpcVersion = '1.58.0' // CURRENT_GRPC_VERSION
-def protocVersion = '3.22.3'
-
-
-checkstyleMain {
- source = fileTree('src/main/java')
-}
-
-compileJava {
- options.release = 8
-
- options.errorprone.disableWarningsInGeneratedCode = true
- options.errorprone.errorproneArgs = ["-Xep:IgnoredPureGetter:OFF"]
- options.errorprone.errorproneArgs.add("-XepExcludedPaths:.*/build/generated/.*")
-}
-
-compileJava9Java {
-
- options.release = 9
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
- def util_jar="${project(":util").jar.outputs.files.getFiles().getAt(0)}"
- def pkix_jar="${project(":pkix").jar.outputs.files.getFiles().getAt(0)}"
-
-
- options.compilerArgs += [
- '--module-path', "${prov_jar}${File.pathSeparator}${util_jar}${File.pathSeparator}${pkix_jar}"
- ]
-
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.9'])
-}
-
-protobuf {
- protoc {
- artifact = "com.google.protobuf:protoc:${protocVersion}"
- }
- plugins {
- grpc {
- artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
- }
- }
- generateProtoTasks {
- all()*.plugins {
- grpc {}
- }
- }
-}
-
-jar.archiveBaseName = "bcmls-$vmrange"
-
-
-startScripts.enabled = false
-
-// Creates start scripts for a class name and adds it to the distribution.
-def createStartScripts(String mainClassName) {
- String bareName = mainClassName.substring(mainClassName.lastIndexOf('.') + 1);
- String taskName = bareName.uncapitalize();
- def newTask = tasks.register(taskName, CreateStartScripts) {
- mainClass = mainClassName
- applicationName = taskName.replaceAll('([A-Z])') { '-' + it[0].uncapitalize() }
- outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
-// classpath = startScripts.classpath
- }
- application {
- applicationDistribution.into('bin') {
- from(newTask)
- fileMode = 0755
- }
- }
-}
-
-extractIncludeProto {
- dependsOn(":prov:jar",":util:jar")
-}
-
-extractIncludeTestProto {
- dependsOn(":prov:jar",":util:jar")
-}
-
-createStartScripts('org.bouncycastle.mls.client.impl.MLSClient')
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
-
- String packages = 'org.bouncycastle.mls.*'
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bcmls')
- manifest.attributes('Bundle-SymbolicName': 'bcmls')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "${packages};version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,!${packages},org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-task sourcesJar(type: Jar) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- duplicatesStrategy = DuplicatesStrategy.INCLUDE
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
-}
-
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-test {
- jvmArgs = ['-Dtest.java.version.prefix=any']
-}
-
-compileJava9Java.dependsOn([":prov:jar", ":util:jar",":pkix:jar"])
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcmls-$vmrange"
- from components.java
-
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
-
- }
-}
diff --git a/nbactions.xml b/nbactions.xml
new file mode 100644
index 0000000000..89740e4302
--- /dev/null
+++ b/nbactions.xml
@@ -0,0 +1,16 @@
+
+
+
+ rebuild
+
+ *
+
+
+ clean
+ install
+
+
+ true
+
+
+
diff --git a/pg/build.gradle b/pg/build.gradle
deleted file mode 100644
index cc69f1ecc0..0000000000
--- a/pg/build.gradle
+++ /dev/null
@@ -1,137 +0,0 @@
-
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-sourceSets {
- main {
- java {
- srcDirs = ["$buildDir/generated-src"]
- }
- }
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-}
-
-
-dependencies {
- implementation project(':prov')
- implementation project(':util')
-
- java9Implementation project(':prov')
- java9Implementation project(':util')
- java9Implementation files(sourceSets.main.output.classesDirs) {
- builtBy compileJava
- }
-
- testImplementation group: 'junit', name: 'junit', version: '4.13.2'
-}
-
-evaluationDependsOn(":prov")
-evaluationDependsOn(":util")
-
-task generateSources(type: Copy) {
- from 'src/main/java'
- into "$buildDir/generated-src"
- filter { line -> line.replaceAll('@RELEASE_NAME@', "${version}") }
-}
-
-compileJava.dependsOn generateSources
-
-compileJava {
-
- options.release = 8
-}
-
-
-compileJava9Java {
-
- options.release = 9
-
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
- def util_jar="${project(":util").jar.outputs.files.getFiles().getAt(0)}"
-
- options.compilerArgs += [
- '--module-path', "${prov_jar}${File.pathSeparator}${util_jar}"
- ]
-
- options.sourcepath = files(["$buildDir/generated-src", 'src/main/jdk1.9'])
-}
-
-
-jar.archiveBaseName = "bcpg-$vmrange"
-
-
-
-task sourcesJar(type: Jar) {
- dependsOn generateSources
-
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- exclude("**/*.so")
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
-}
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Bundle-Name': 'bcpg')
- manifest.attributes('Bundle-SymbolicName': 'bcpg')
- manifest.attributes('Export-Package': "org.bouncycastle.{apache|bcpg|gpg|openpgp}.*;version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,!org.bouncycastle.{apache|bcpg|gpg|openpgp|}.*,org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-test {
- forkEvery = 1;
- maxParallelForks = 8;
- maxHeapSize = "3g";
- jvmArgs = ['-Dtest.java.version.prefix=any']
-}
-
-compileJava9Java.dependsOn([":prov:jar", ":util:jar"])
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcpg-$vmrange"
- from components.java
-
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
-
- }
-}
diff --git a/pg/pom.xml b/pg/pom.xml
new file mode 100644
index 0000000000..a42aed2250
--- /dev/null
+++ b/pg/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ pg
+ jar
+
+ 1.8
+ 1.8
+
+ bc : pg
+
+
+ ${project.groupId}
+ util
+ ${project.version}
+
+
+ ${project.groupId}
+ prov
+ ${project.version}
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+
\ No newline at end of file
diff --git a/pkix/build.gradle b/pkix/build.gradle
deleted file mode 100644
index 1903d246e5..0000000000
--- a/pkix/build.gradle
+++ /dev/null
@@ -1,122 +0,0 @@
-
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-sourceSets {
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-}
-
-evaluationDependsOn(":prov")
-evaluationDependsOn(":util")
-
-dependencies {
-
- implementation project(':prov')
- implementation project(':util')
-
- java9Implementation project(':prov')
- java9Implementation project(':util')
- java9Implementation files(sourceSets.main.output.classesDirs) {
- builtBy compileJava
- }
-
- testImplementation group: 'junit', name: 'junit', version: '4.13.2'
-}
-
-compileJava {
- options.release = 8
-}
-
-
-
-compileJava9Java {
- options.release = 9
-
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
- def util_jar="${project(":util").jar.outputs.files.getFiles().getAt(0)}"
-
- options.compilerArgs += [
- '--module-path', "${prov_jar}${File.pathSeparator}${util_jar}"
- ]
-
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.9'])
-}
-
-
-
-jar.archiveBaseName = "bcpkix-$vmrange"
-
-
-task sourcesJar(type: Jar) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- exclude("**/*.so")
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
-}
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
-
- String packages = 'org.bouncycastle.{cert|cmc|cms|dvcs|eac|est|its|mime|mozilla|voms|operator|pkix|openssl|pkcs|tsp}.*'
-
- String v = "${rootProject.extensions.ext.bundle_version}"
-
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bcpkix')
- manifest.attributes('Bundle-SymbolicName': 'bcpkix')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "${packages};version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,!${packages},org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-test {
- forkEvery = 1;
- maxParallelForks = 8;
- jvmArgs = ['-Dtest.java.version.prefix=any']
-}
-
-compileJava9Java.dependsOn([":prov:jar", ":util:jar"])
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcpkix-$vmrange"
- from components.java
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
- }
-}
diff --git a/pkix/pom.xml b/pkix/pom.xml
new file mode 100644
index 0000000000..d920b28975
--- /dev/null
+++ b/pkix/pom.xml
@@ -0,0 +1,40 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ pkix
+ jar
+
+ 1.8
+ 1.8
+
+ bc : pkix
+
+
+ ${project.groupId}
+ core
+ ${project.version}
+
+
+ ${project.groupId}
+ prov
+ ${project.version}
+
+
+ ${project.groupId}
+ util
+ ${project.version}
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000000..f56fdc81a9
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+ pom
+
+ core
+ prov
+ pkix
+ mail
+ pg
+ tls
+ util
+
+
+ UTF-8
+
+
diff --git a/prov/build.gradle b/prov/build.gradle
deleted file mode 100644
index fd0eb881b3..0000000000
--- a/prov/build.gradle
+++ /dev/null
@@ -1,392 +0,0 @@
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-dependencies {
- testImplementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
-}
-
-evaluationDependsOn(":core")
-
-sourceSets {
- main {
- java {
- srcDirs "${project(":core").projectDir}/src/main/java"
- }
- resources {
- srcDirs "${project(":core").projectDir}/src/main/resources"
- }
- }
-
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
- java11 {
- java {
- srcDirs = ['src/main/jdk1.11']
- }
- }
- java15 {
- java {
- srcDirs = ['src/main/jdk1.15']
- }
- }
- java21 {
- java {
- srcDirs = ['src/main/jdk21']
- }
- }
-
-}
-
-dependencies {
-
- java9Implementation files([sourceSets.main.output.classesDirs]) {
- builtBy compileJava
- }
-
- java11Implementation files([
- sourceSets.main.output.classesDirs,
- sourceSets.java9.output.classesDirs]) {
- builtBy compileJava9Java
- }
-
- java15Implementation files([
- sourceSets.main.output.classesDirs,
- sourceSets.java9.output.classesDirs,
- sourceSets.java11.output.classesDirs]) {
- builtBy compileJava11Java
- }
-
- java21Implementation files([
- sourceSets.main.output.classesDirs,
- sourceSets.java9.output.classesDirs,
- sourceSets.java11.output.classesDirs,
- sourceSets.java15.output.classesDirs]) {
- builtBy compileJava15Java
- }
-}
-
-
-compileJava {
- options.release = 8;
-}
-
-compileJava9Java {
- options.release = 9
- options.sourcepath = files(['../core/src/main/java', 'src/main/java', 'src/main/jdk1.9'])
-}
-
-compileJava11Java {
- options.release = 11
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.11'])
-}
-
-compileJava15Java {
- options.release = 15
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.15'])
-}
-
-compileJava21Java {
- options.release = 21
- options.sourcepath = files(['src/main/java', 'src/main/jdk21'])
-}
-
-
-task sourcesJar(type: Jar) {
- archiveBaseName="bcprov"
- archiveAppendix="${vmrange}"
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- exclude("**/*.so")
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
- into('META-INF/versions/11') {
- from sourceSets.java11.allSource
- }
- into('META-INF/versions/15') {
- from sourceSets.java15.allSource
- }
- into('META-INF/versions/21') {
- from sourceSets.java21.allSource
- }
-}
-
-jar {
- jar.archiveBaseName="bcprov"
- jar.archiveAppendix="${vmrange}"
-
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
- into('META-INF/versions/11') {
- from sourceSets.java11.output
- }
- into('META-INF/versions/15') {
- from sourceSets.java15.output
- }
- into('META-INF/versions/21') {
- from sourceSets.java21.output
- }
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bcprov')
- manifest.attributes('Bundle-SymbolicName': 'bcprov')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "!org.bouncycastle.internal.*,org.bouncycastle.*;version=${v}")
- manifest.attributes('Import-Package': 'java.*;resolution:=optional,javax.*;resolution:=optional')
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName="bcprov"
- archiveAppendix="${vmrange}"
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-
-
-sourceSets {
- test11 {
- java {
- compileClasspath += main.output + test.output
- runtimeClasspath += test.output
- srcDir(files("src/test/jdk1.11"))
- }
- }
-
- test15 {
- java {
- compileClasspath += main.output + test.output
- runtimeClasspath += test.output
- srcDir(files("src/test/jdk1.15"))
- }
- }
-
- test21 {
- java {
- compileClasspath += main.output + test.output
- runtimeClasspath += test.output
- srcDir(files("src/test/jdk21"))
- }
- }
-}
-
-dependencies {
- test11Implementation group: 'junit', name: 'junit', version: '4.13.2'
- test15Implementation group: 'junit', name: 'junit', version: '4.13.2'
- test21Implementation group: 'junit', name: 'junit', version: '4.13.2'
- test11Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
- test15Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
- test21Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
- test11Implementation(project(":core"))
- test15Implementation(project(":core"))
- test21Implementation(project(":core"))
-}
-
-
-
-
-compileTest11Java {
- options.release = 11
- options.sourcepath = files(['src/test/java', 'src/test/jdk1.11'])
-}
-
-compileTest15Java {
- options.release = 15
- options.sourcepath = files(['src/test/java', 'src/test/jdk1.15'])
-}
-
-compileTest21Java {
- options.release = 21
- options.sourcepath = files(['src/test/java', 'src/test/jdk21'])
-}
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcprov-$vmrange"
- from components.java
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
- }
-}
-
-
-test {
- jvmArgs = ['-Dtest.java.version.prefix=any']
-}
-
-
-task test8(type: Test) {
- onlyIf {System.getenv("BC_JDK8") != null}
- dependsOn(jar)
-
- testClassesDirs = sourceSets.test.output.classesDirs
- classpath = sourceSets.test.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(8)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=1.8']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-task test11(type: Test) {
- onlyIf {System.getenv("BC_JDK11") != null}
- dependsOn(jar)
-
- testClassesDirs = sourceSets.test11.output.classesDirs
- classpath = sourceSets.test11.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(11)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=11']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-task test15(type: Test) {
-
- // This is testing the 1.15 code base
- onlyIf {System.getenv("BC_JDK17") != null}
- dependsOn jar
-
- testClassesDirs = sourceSets.test15.output.classesDirs
- classpath = sourceSets.test15.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(17)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=17']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-task test21(type: Test) {
-
- // This is testing the 21 code base
- onlyIf {System.getenv("BC_JDK21") != null}
- dependsOn jar
-
- testClassesDirs = sourceSets.test21.output.classesDirs
- classpath = sourceSets.test21.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(21)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=21']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-if (System.getenv("BC_JDK8") != null) {
- System.out.println("${project.name}: Adding test8 as dependency for test task because BC_JDK8 is defined")
- test.dependsOn("test8")
-}
-
-if (System.getenv("BC_JDK11") != null) {
- System.out.println("${project.name}: Adding test11 as dependency for test task because BC_JDK11 is defined")
- test.dependsOn("test11")
-}
-
-if (System.getenv("BC_JDK17") != null) {
- System.out.println("${project.name}: Adding test15 as dependency for test task because BC_JDK17 is defined")
- test.dependsOn("test15")
-}
-
-if (System.getenv("BC_JDK21") != null) {
- System.out.println("${project.name}: Adding test21 as dependency for test task because BC_JDK21 is defined")
- test.dependsOn("test21")
-}
-
-
-
-
diff --git a/prov/pom.xml b/prov/pom.xml
new file mode 100644
index 0000000000..513f8c79fc
--- /dev/null
+++ b/prov/pom.xml
@@ -0,0 +1,36 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ prov
+ jar
+
+ 1.8
+ 1.8
+
+ bc : prov
+
+
+ ${project.groupId}
+ core
+ ${project.version}
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+ com.unboundid
+ unboundid-ldapsdk
+ 6.0.8
+ test
+
+
+
\ No newline at end of file
diff --git a/publish.gradle b/publish.gradle
deleted file mode 100644
index d1d1a506ce..0000000000
--- a/publish.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-gradle.projectsEvaluated {
-
-}
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index cf2608deed..0000000000
--- a/settings.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-include "bom"
-include "core"
-include "util"
-include "pg"
-include "pkix"
-include "prov"
-include "tls"
-include "test"
-include "mls"
-include "mail"
-include "jmail"
diff --git a/spotbugs.gradle b/spotbugs.gradle
deleted file mode 100644
index 7392a9acc7..0000000000
--- a/spotbugs.gradle
+++ /dev/null
@@ -1,68 +0,0 @@
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
-
- dependencies {
- classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:1.6.2"
- classpath "net.saliman:gradle-cobertura-plugin:2.2.8"
- }
-
-}
-
-
-
-
-allprojects {
- apply plugin: 'java'
- apply plugin: "com.github.spotbugs"
- apply plugin: 'net.saliman.cobertura'
-
- repositories {
- mavenCentral()
- }
-
- dependencies {
-
- }
-
- compileJava {
- options.debug = true
- }
-
- spotbugs {
- toolVersion = '3.1.6'
- }
-
- tasks.withType(com.github.spotbugs.SpotBugsTask) {
- reports {
- xml.enabled = false
- html.enabled = true
- }
- }
-
- spotbugs {
- excludeFilter = file("${rootDir}/spotbugs/excludeFilter.xml");
- }
-
-}
-
-test {
- exclude('**/*')
-}
-
-subprojects {
- apply plugin: 'eclipse'
- sourceCompatibility = 1.5
- targetCompatibility = 1.5
-}
-
-
-
-
-
-
-
-
diff --git a/spotbugs.settings.gradle b/spotbugs.settings.gradle
deleted file mode 100644
index c7e4590fe3..0000000000
--- a/spotbugs.settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-include "core","mail","pg","pkix","prov","tls"
-
-rootProject.buildFileName = 'spotbugs.gradle'
\ No newline at end of file
diff --git a/spotbugs_settings.gradle b/spotbugs_settings.gradle
deleted file mode 100644
index c7e4590fe3..0000000000
--- a/spotbugs_settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-include "core","mail","pg","pkix","prov","tls"
-
-rootProject.buildFileName = 'spotbugs.gradle'
\ No newline at end of file
diff --git a/test/build.gradle b/test/build.gradle
deleted file mode 100644
index 62e12a040f..0000000000
--- a/test/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-dependencies {
- implementation fileTree(dir: 'libs', include: '*.jar')
- implementation project(":core")
- // implementation project(":mail")
- implementation project(":pg")
- implementation project(":util")
- implementation project(":pkix")
- implementation project(":prov")
- implementation project(":tls")
- testImplementation group: 'junit', name: 'junit', version: '4.11'
-}
-
diff --git a/tls/build.gradle b/tls/build.gradle
deleted file mode 100644
index 2375a44268..0000000000
--- a/tls/build.gradle
+++ /dev/null
@@ -1,340 +0,0 @@
-
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-jar.archiveBaseName = "bctls-$vmrange"
-
-sourceSets {
- main {
- java {
- srcDirs = ['src/main/java', 'src/main/jdk1.5']
- }
- }
-
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-
- java25 {
- java {
- srcDirs = ['src/main/jdk25']
- }
- }
-
- test11 {
- java {
- compileClasspath += main.output + test.output
- runtimeClasspath += test.output
- srcDir(files("src/test/jdk1.11"))
- }
- }
-
- test15 {
- java {
- compileClasspath += main.output + test.output
- runtimeClasspath += test.output
- srcDir(files("src/test/jdk1.15"))
- }
- }
-
- test21 {
- java {
- compileClasspath += main.output + test.output
- runtimeClasspath += test.output
- srcDir(files("src/test/jdk21"))
- }
- }
-
-}
-
-dependencies {
-
- implementation project(':prov')
- implementation project(':util')
- implementation project(':pkix')
-
- java9Implementation project(':prov')
- java9Implementation project(':util')
- java9Implementation project(':pkix')
- java9Implementation files(sourceSets.main.output.classesDirs) {
- builtBy compileJava
- }
-
- test11Implementation group: 'junit', name: 'junit', version: '4.13.2'
- test15Implementation group: 'junit', name: 'junit', version: '4.13.2'
- test21Implementation group: 'junit', name: 'junit', version: '4.13.2'
-
-
- test11Implementation project(':prov')
- test11Implementation project(':util')
- test11Implementation project(':pkix')
-
- test15Implementation project(':prov')
- test15Implementation project(':util')
- test15Implementation project(':pkix')
-
- test21Implementation project(':prov')
- test21Implementation project(':util')
- test21Implementation project(':pkix')
-
-}
-
-
-evaluationDependsOn(":prov")
-evaluationDependsOn(":util")
-evaluationDependsOn(":pkix")
-
-compileJava {
- options.release = 8
-}
-
-compileJava9Java {
-
- options.release = 9
-
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
- def util_jar="${project(":util").jar.outputs.files.getFiles().getAt(0)}"
- def pkix_jar="${project(":pkix").jar.outputs.files.getFiles().getAt(0)}"
-
-
- options.compilerArgs += [
- '--module-path', "${prov_jar}${File.pathSeparator}${util_jar}${File.pathSeparator}${pkix_jar}"
- ]
-
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.9'])
-}
-
-compileTest11Java {
-
- options.release = 11
- options.sourcepath = files(['src/test/java', 'src/test/jdk1.11'])
-}
-
-compileTest15Java {
- options.release = 15
- options.sourcepath = files(['src/test/java', 'src/test/jdk1.15'])
-}
-
-compileTest21Java {
-
- options.release = 21
- options.sourcepath = files(['src/test/java', 'src/test/jdk21'])
-}
-
-
-
-task sourcesJar(type: Jar) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- exclude("**/*.so")
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
- into('META-INF/versions/25') {
- from sourceSets.java25.allSource
- }
-}
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bctls')
- manifest.attributes('Bundle-SymbolicName': 'bctls')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "org.bouncycastle.{jsse|tls}.*;version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,!org.bouncycastle.{jsse|tls}.*,org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bctls-$vmrange"
- from components.java
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
- }
-}
-
-
-
-
-task test8(type: Test) {
- onlyIf {System.getenv("BC_JDK8") != null}
- testClassesDirs = sourceSets.test.output.classesDirs
- classpath = sourceSets.test.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(8)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=1.8']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-task test11(type: Test) {
- onlyIf {System.getenv("BC_JDK11") != null}
- dependsOn(jar)
-
- testClassesDirs = sourceSets.test11.output.classesDirs
- classpath = sourceSets.test11.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(11)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=11']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-task test15(type: Test) {
-
- // This is testing the 1.15 code base
- onlyIf {System.getenv("BC_JDK17") != null}
- dependsOn jar
-
- testClassesDirs = sourceSets.test15.output.classesDirs
- classpath = sourceSets.test15.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(17)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=17']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-task test21(type: Test) {
-
- // This is testing the 21 code base
- onlyIf {System.getenv("BC_JDK21") != null}
- dependsOn jar
-
- testClassesDirs = sourceSets.test21.output.classesDirs
- classpath = sourceSets.test21.runtimeClasspath + files(jar.archiveFile)
-
- forkEvery = 1;
- maxParallelForks = 8;
-
- systemProperty 'bc.test.data.home', bcTestDataHome
- maxHeapSize = "1536m"
- testLogging.showStandardStreams = false
-
- javaLauncher = javaToolchains.launcherFor {
- languageVersion = JavaLanguageVersion.of(21)
- }
-
- jvmArgs = ['-Dtest.java.version.prefix=21']
-
-
- finalizedBy jacocoTestReport
-
- filter {
- includeTestsMatching "AllTest*"
- if (project.hasProperty('excludeTests')) {
- excludeTestsMatching "${excludeTests}"
- }
- }
-}
-
-if (System.getenv("BC_JDK8") != null) {
- System.out.println("${project.name}: Adding test8 as dependency for test task because BC_JDK8 is defined")
- test.dependsOn("test8")
-}
-
-if (System.getenv("BC_JDK11") != null) {
- System.out.println("${project.name}: Adding test11 as dependency for test task because BC_JDK11 is defined")
- test.dependsOn("test11")
-}
-
-if (System.getenv("BC_JDK17") != null) {
- System.out.println("${project.name}: Adding test15 as dependency for test task because BC_JDK17 is defined")
- test.dependsOn("test15")
-}
-
-if (System.getenv("BC_JDK21") != null) {
- System.out.println("${project.name}: Adding test21 as dependency for test task because BC_JDK21 is defined")
- test.dependsOn("test21")
-}
-
-
-
-compileJava9Java.dependsOn([":prov:jar", ":util:jar",":pkix:jar"])
diff --git a/tls/pom.xml b/tls/pom.xml
new file mode 100644
index 0000000000..2f9bd93944
--- /dev/null
+++ b/tls/pom.xml
@@ -0,0 +1,64 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ tls
+ jar
+
+ 1.8
+ 1.8
+
+ bc : tls
+
+
+ ${project.groupId}
+ util
+ ${project.version}
+
+
+ ${project.groupId}
+ prov
+ ${project.version}
+
+
+ ${project.groupId}
+ pkix
+ ${project.version}
+ test
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 3.4.0
+
+
+ add-extra-source
+ generate-sources
+
+ add-source
+
+
+
+ ${project.basedir}/src/main/jdk1.5
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/util/build.gradle b/util/build.gradle
deleted file mode 100644
index 1a3ef317d5..0000000000
--- a/util/build.gradle
+++ /dev/null
@@ -1,127 +0,0 @@
-
-plugins {
- id "biz.aQute.bnd.builder" version "7.0.0"
-}
-
-jar.archiveBaseName = "bcutil-$vmrange"
-
-
-sourceSets {
- java9 {
- java {
- srcDirs = ['src/main/jdk1.9']
- }
- }
-
-}
-
-
-dependencies {
-
- implementation project(':prov')
-
- testImplementation group: 'junit', name: 'junit', version: '4.11'
-
- java9Implementation files([sourceSets.main.output.classesDirs]) {
- builtBy compileJava
- }
- java9Implementation project(':prov')
-
-
-}
-
-evaluationDependsOn(":prov")
-
-compileJava {
- options.release = 8
-}
-
-
-compileJava9Java {
-
-
- def prov_jar="${project(":prov").jar.outputs.files.getFiles().getAt(0)}"
-
- options.compilerArgs += [
- '--module-path', "${prov_jar}"
- ]
-
- sourceCompatibility = 9
- targetCompatibility = 9
- options.sourcepath = files(['src/main/java', 'src/main/jdk1.9'])
-}
-
-
-jar {
- from sourceSets.main.output
- into('META-INF/versions/9') {
- from sourceSets.java9.output
- }
- String packages = 'org.bouncycastle.asn1.{bsi|cmc|cmp|cms|crmf|cryptlib|dvcs|eac|edec|esf|ess|est|gnu|iana|icao|isara|isismtt|iso|kisa|microsoft|misc|mozilla|nsri|ntt|oiw|rosstandart|smime|tsp}.*'
- String v = "${rootProject.extensions.ext.bundle_version}"
- manifest.attributes('Multi-Release': 'true')
- manifest.attributes('Bundle-Name': 'bcutil')
- manifest.attributes('Bundle-SymbolicName': 'bcutil')
- manifest.attributes('Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8')
- manifest.attributes('Export-Package': "${packages};version=${v},org.bouncycastle.oer.*;version=${v}")
- manifest.attributes('Import-Package': "java.*;resolution:=optional,javax.*;resolution:=optional,!${packages},!org.bouncycastle.oer.*,org.bouncycastle.*;version=\"[${v},${maxVersion})\"")
- manifest.attributes('Bundle-Version': "${v}")
- manifest.attributes('Permissions': 'all-permissions')
- manifest.attributes('Codebase': '*')
- manifest.attributes('Application-Library-Allowable-Codebase': '*')
- manifest.attributes('Caller-Allowable-Codebase': '*')
- manifest.attributes('Trusted-Library': 'true')
-}
-
-jar.doLast {
- if (System.getenv("SIGNJAR_CMD") != null ) {
- exec {
- commandLine(System.getenv("SIGNJAR_CMD"),jar.archiveFile)
- }
- }
-}
-
-
-
-task sourcesJar(type: Jar) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'sources'
- from sourceSets.main.allSource
- exclude("**/*.so")
- into('META-INF/versions/9') {
- from sourceSets.java9.allSource
- }
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- archiveBaseName = jar.archiveBaseName
- archiveClassifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
- archives javadocJar
- archives sourcesJar
-}
-
-publishing {
- publications {
- maven(MavenPublication) {
- groupId = 'org.bouncycastle'
- artifactId = "bcutil-$vmrange"
- from components.java
-
- artifact(javadocJar)
- artifact(sourcesJar)
- }
-
- }
-}
-
-
-test {
- forkEvery = 1;
- maxParallelForks = 8;
-}
-
diff --git a/util/pom.xml b/util/pom.xml
new file mode 100644
index 0000000000..a965045a80
--- /dev/null
+++ b/util/pom.xml
@@ -0,0 +1,30 @@
+
+
+ 4.0.0
+
+ org.bouncycastle
+ bc
+ 1.82-SNAPSHOT
+
+ util
+ jar
+
+ 1.8
+ 1.8
+
+ bc : util
+
+
+ ${project.groupId}
+ core
+ ${project.version}
+
+
+ junit
+ junit
+ 4.13.2
+ test
+ jar
+
+
+
\ No newline at end of file