Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gradle-jni is a utility library for enabling easy to build JNI compatible plugin

```gradle
plugins {
id 'edu.wpi.first.GradleJni' version '0.1.6'
id 'org.wpilib.GradleJni' version '2027.0.0'
}

model {
Expand All @@ -27,6 +27,6 @@ JNICrossCompileOptions('toolChainName') // Use this to match the cross compile o
JNICrossCompileOptions('operatingSystem', 'architecture') // Use this to match the cross compile options to a specific tool chain arch and os.

// For both of these options, they take an optional last parameter of List<String> of directories
If this parameter is added, the directories passed in will be used for the include paths for the JNI headers.
If this parameter is added, the directories passed in will be used for the include paths for the JNI headers.
If this parameter is not passed in, for any matching toolchain, a set of headers included in the plugin will be used. These headers are standard for 32 bit embedded arm toolchains.
```
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
id "com.gradle.plugin-publish" version "1.3.0"
}

group = 'edu.wpi.first'
version = '1.2.0'
group = 'org.wpilib'
version = '2027.0.0'

if (project.hasProperty('publishVersion')) {
version = project.publishVersion
Expand All @@ -21,15 +21,15 @@ gradlePlugin {
vcsUrl = 'https://github.com/wpilibsuite/gradle-jni'
plugins {
GradleJni {
id = 'edu.wpi.first.GradleJni'
id = 'org.wpilib.GradleJni'
displayName = 'Gradle JNI'
implementationClass = 'edu.wpi.first.jni.GradleJni'
implementationClass = 'org.wpilib.jni.GradleJni'
description = 'This plugin provides easy to use JNI support for gradle.'
tags = ['groovy', 'jni', 'utils', 'maven', 'frc', 'wpilib']
}
}
}

wrapper {
gradleVersion = '8.11'
gradleVersion = '9.2.0'
}
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'cpp'
id 'edu.wpi.first.GradleJni' version '1.0.0'
id 'org.wpilib.GradleJni' version '2027.0.0'
}

model {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 4 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 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.
Expand Down Expand Up @@ -86,8 +86,7 @@ done
# 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 -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -115,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -173,7 +171,6 @@ fi
# 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" )

Expand Down Expand Up @@ -206,15 +203,14 @@ fi
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,
# * DEFAULT_JVM_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 \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
3 changes: 1 addition & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ 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 %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.api.file.DirectoryProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.api.file.DirectoryProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import java.io.File;
import java.io.FileOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.api.file.DirectoryProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.nativeplatform.NativeExecutableSpec;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.nativeplatform.NativeLibrarySpec;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.api.file.DirectoryProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.Project;
import org.gradle.api.file.DirectoryProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import static edu.wpi.first.jni.net.fornwall.jelf.ElfSection.SHT_DYNSYM;
import static edu.wpi.first.jni.net.fornwall.jelf.ElfSymbol.BINDING_GLOBAL;
import static edu.wpi.first.jni.net.fornwall.jelf.ElfSymbol.STT_FUNC;
import static org.wpilib.jni.net.fornwall.jelf.ElfSection.SHT_DYNSYM;
import static org.wpilib.jni.net.fornwall.jelf.ElfSymbol.BINDING_GLOBAL;
import static org.wpilib.jni.net.fornwall.jelf.ElfSymbol.STT_FUNC;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand Down Expand Up @@ -35,11 +35,10 @@
import org.gradle.nativeplatform.toolchain.internal.msvcpp.VisualStudioInstall;
import org.gradle.platform.base.internal.toolchain.SearchResult;
import org.gradle.process.ExecOperations;

import edu.wpi.first.jni.net.fornwall.jelf.ElfException;
import edu.wpi.first.jni.net.fornwall.jelf.ElfFile;
import edu.wpi.first.jni.net.fornwall.jelf.ElfSection;
import edu.wpi.first.jni.net.fornwall.jelf.ElfSymbol;
import org.wpilib.jni.net.fornwall.jelf.ElfException;
import org.wpilib.jni.net.fornwall.jelf.ElfFile;
import org.wpilib.jni.net.fornwall.jelf.ElfSection;
import org.wpilib.jni.net.fornwall.jelf.ElfSymbol;

public class JniSymbolCheck extends DefaultTask {
private final RegularFileProperty foundSymbols;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni;
package org.wpilib.jni;

import org.gradle.api.Project;
import org.gradle.api.file.FileCollection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

/**
* Generic exception class for all exceptions which occur in this package. Since
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;


public class ElfHashTable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.ByteArrayInputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.wpi.first.jni.net.fornwall.jelf;
package org.wpilib.jni.net.fornwall.jelf;

import java.io.IOException;

Expand Down