Skip to content

Commit

Permalink
Change package name to io.github.apl_cornell. (#80)
Browse files Browse the repository at this point in the history
* Add Spotless to buildSrc

* Change group to io.github.apl_cornell

* Move nativetools to io.github.apl_cornell
  • Loading branch information
cacay authored Feb 15, 2022
1 parent 07f64ef commit 298111b
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 44 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import edu.cornell.cs.apl.nativetools.Library
import io.github.apl_cornell.nativetools.Library
import org.gradle.api.JavaVersion.VERSION_1_8

plugins {
Expand All @@ -15,7 +15,7 @@ plugins {
`swig-library`
}

group = "com.github.apl-cornell"
group = "io.github.apl-cornell"

// Compute version from GitHub tag if available
System.getenv("GITHUB_REF")?.substringAfterLast('/')?.let { gitTag ->
Expand Down
15 changes: 14 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
plugins {
`kotlin-dsl`

// Style checking
id("com.diffplug.spotless") version "6.2.2"
}

repositories {
Expand All @@ -10,11 +13,21 @@ dependencies {
implementation("de.undercouch:gradle-download-task:4.1.1")
}

spotless {
kotlin {
ktlint()
}

kotlinGradle {
ktlint()
}
}

gradlePlugin {
plugins {
register("swig-library-plugin") {
id = "swig-library"
implementationClass = "edu.cornell.cs.apl.nativetools.SwigLibraryPlugin"
implementationClass = "io.github.apl_cornell.nativetools.SwigLibraryPlugin"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package edu.cornell.cs.apl.nativetools

import edu.cornell.cs.apl.nativetools.templates.LibraryConstants
import edu.cornell.cs.apl.nativetools.templates.Platform
import edu.cornell.cs.apl.nativetools.templates.buildMakefile
import edu.cornell.cs.apl.nativetools.templates.cmakeLists
import edu.cornell.cs.apl.nativetools.templates.dependenciesMakefile
import edu.cornell.cs.apl.nativetools.templates.dockerignore
import edu.cornell.cs.apl.nativetools.templates.getMakefile
import edu.cornell.cs.apl.nativetools.templates.linuxDockerfile
import edu.cornell.cs.apl.nativetools.templates.macosDockerfile
import edu.cornell.cs.apl.nativetools.templates.swigDockerfile
import edu.cornell.cs.apl.nativetools.templates.swigMakefile
package io.github.apl_cornell.nativetools

import io.github.apl_cornell.nativetools.templates.LibraryConstants
import io.github.apl_cornell.nativetools.templates.Platform
import io.github.apl_cornell.nativetools.templates.buildMakefile
import io.github.apl_cornell.nativetools.templates.cmakeLists
import io.github.apl_cornell.nativetools.templates.dependenciesMakefile
import io.github.apl_cornell.nativetools.templates.dockerignore
import io.github.apl_cornell.nativetools.templates.getMakefile
import io.github.apl_cornell.nativetools.templates.linuxDockerfile
import io.github.apl_cornell.nativetools.templates.macosDockerfile
import io.github.apl_cornell.nativetools.templates.swigDockerfile
import io.github.apl_cornell.nativetools.templates.swigMakefile
import org.gradle.api.DefaultTask
import org.gradle.api.file.Directory
import org.gradle.api.file.DirectoryProperty
Expand Down Expand Up @@ -119,7 +119,7 @@ abstract class CollectLibraryTask : DefaultTask() {
return
val file = this.get().file(resource).asFile
project.mkdir(file.parentFile)
file.writeBytes(resourceURL.readBytes())
file.writeBytes(resourceURL!!.readBytes())
}

/** Copies [file] into this directory and renames it to [name]. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import org.apache.tools.ant.util.TeeOutputStream
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import org.gradle.api.DefaultTask
import org.gradle.api.file.Directory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import de.undercouch.gradle.tasks.download.DownloadAction
import java.io.File
import org.gradle.api.DefaultTask
import org.gradle.api.file.Directory
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import java.io.File

abstract class DownloadJNITask : DefaultTask() {
@get:Internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import edu.cornell.cs.apl.nativetools.templates.LibraryConstants
import edu.cornell.cs.apl.nativetools.templates.Platform
import java.io.File
import io.github.apl_cornell.nativetools.templates.LibraryConstants
import io.github.apl_cornell.nativetools.templates.Platform
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.SourceSet
Expand All @@ -11,6 +10,7 @@ import org.gradle.api.tasks.TaskProvider
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.register
import java.io.File

class SwigLibraryPlugin : Plugin<Project> {
override fun apply(project: Project) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import org.gradle.api.provider.ListProperty

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools
package io.github.apl_cornell.nativetools

import org.gradle.api.file.Directory
import org.gradle.api.file.RegularFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

/** Makefile for building the library. */
internal val buildMakefile = Makefile("build.mk") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

internal val cmakeLists = Template("CMakeLists.txt") {
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

/** Makefile for downloading and installing the dependencies. */
internal val dependenciesMakefile = Makefile("dependencies.mk") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

internal val swigDockerfile = Template("swig.dockerfile") {
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

internal val dockerignore = Template(".dockerignore") {
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

import java.nio.file.Path
import java.nio.file.Paths
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

import edu.cornell.cs.apl.nativetools.Library
import edu.cornell.cs.apl.nativetools.SwigLibraryPlugin
import io.github.apl_cornell.nativetools.Library
import io.github.apl_cornell.nativetools.SwigLibraryPlugin
import java.nio.file.Path
import java.nio.file.Paths

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

/** Platforms we can generate native binaries for. */
internal enum class Platform {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

/** Makefile for generating the Java interface using SWIG. */
internal val swigMakefile = Makefile("swig.mk") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.cornell.cs.apl.nativetools.templates
package io.github.apl_cornell.nativetools.templates

import org.gradle.api.file.Directory
import org.gradle.api.provider.Provider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.apl_cornell.aby;
package io.github.apl_cornell.aby;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.apl_cornell.aby;
package io.github.apl_cornell.aby;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.apl_cornell.aby;
package io.github.apl_cornell.aby;

/**
* A supertype for binary-gate adding methods such as {@link Circuit#putADDGate(Share, Share)} and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.apl_cornell.aby;
package io.github.apl_cornell.aby;

/** A function that builds a single-output circuit. */
interface CircuitBuilder {
Expand Down

0 comments on commit 298111b

Please sign in to comment.