Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrullmann committed Mar 19, 2019
1 parent 86677a4 commit dc08a37
Show file tree
Hide file tree
Showing 57 changed files with 2,496 additions and 24 deletions.
31 changes: 8 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Gradle
.gradle/
build/

# IntelliJ IDEA
.idea/
*.iml
out/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 The Unbroken Dome
Copyright (c) 2019 Till Krullmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
70 changes: 70 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") apply false
id("org.unbroken-dome.test-sets") version "2.1.1" apply false
id("io.spring.dependency-management") version "1.0.7.RELEASE" apply false
id("com.jfrog.bintray") version "1.8.4" apply false
}


allprojects {
repositories {
jcenter()
}
}


val release: Task by tasks.creating {
doLast {
println("Releasing $version")
}
}


if ("release" !in gradle.startParameter.taskNames) {
println("Not a release build, setting version to ${project.version}-SNAPSHOT")
project.version = "${project.version}-SNAPSHOT"
}


subprojects {

plugins.withId("base") {
apply(plugin = "io.spring.dependency-management")
}

plugins.withId("java") {
dependencies {
"compileOnly"("com.google.code.findbugs:jsr305")
"testImplementation"("org.junit.jupiter:junit-jupiter-api")
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine")
}

tasks.withType<Test> {
useJUnitPlatform()
}
}

plugins.withId("org.jetbrains.kotlin.jvm") {
dependencies {
"implementation"(kotlin("stdlib-jdk8"))

"testImplementation"("com.willowtreeapps.assertk:assertk-jvm")
"testImplementation"("io.mockk:mockk")
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = listOf("-Xjvm-default=enable")
}
}

plugins.withId("io.spring.dependency-management") {
apply(from = "$rootDir/gradle/dependency-management.gradle")
}

plugins.withId("com.jfrog.bintray") {
apply(from = "$rootDir/gradle/publishing.gradle")
}
}
22 changes: 22 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kotlin.code.style=official
kotlinVersion=1.3.21

group=org.unbroken-dome.spring-blobstore
version=0.1.0


friendly_name=Spring Blobstore
description=A blobstore abstraction for use in Spring applications
home_url=https://github.com/unbroken-dome/spring-blobstore

scm_url=https://github.com/unbroken-dome/spring-blobstore.git
issues_url=https://github.com/unbroken-dome/spring-blobstore/issues

license_name=The MIT License (MIT)
license_url=http://opensource.org/licenses/MIT

bintray_user=
bintray_key=
bintray_labels=blobstore,spring
bintray_repo=tools
bintray_dryrun=false
34 changes: 34 additions & 0 deletions gradle/dependency-management.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
dependencyManagement {

imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:2.1.3.RELEASE")
}

dependencies {

dependencySet("org.bouncycastle:1.61") {
entry("bcpkix-jdk15on")
}

dependency("org.unbroken-dome.jsonwebtoken:jwt:1.5.0")
}
}


def dependencySetVersions = [
"com.google.code.findbugs" : "3.0.2",
"com.willowtreeapps.assertk": "0.13",
"io.mockk" : "1.9.1",
"org.jetbrains.kotlin" : kotlinVersion,
"org.junit.jupiter" : "5.4.0"
]


configurations.all { Configuration conf ->
conf.resolutionStrategy.eachDependency { details ->
def v = dependencySetVersions[details.requested.group]
if (v) {
details.useVersion(v)
}
}
}
53 changes: 53 additions & 0 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apply plugin: "maven-publish"


task sourcesJar(type: Jar) {
group = "build"
description = "Assembles a jar archive containing the sources."
from sourceSets.main.allSource
archiveClassifier = "sources"
}


publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
}
}
}


bintray {
publications = ["mavenJava"]

user = project.bintray_user
key = project.bintray_key

dryRun = Boolean.valueOf(project.bintray_dryrun as String)

pkg {
repo = project.bintray_repo
name = project.name
desc = project.description
websiteUrl = project.home_url
licenses = ['MIT']
labels = project.bintray_labels.split(',')

vcsUrl = project.scm_url
issueTrackerUrl = project.issues_url
publicDownloadNumbers = true
}

pkg.version {
name = project.version
released = new Date()
vcsTag = project.version
}
}


task release {
dependsOn tasks.bintrayUpload
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit dc08a37

Please sign in to comment.