Skip to content

Commit

Permalink
Renamed to conform new group id.
Browse files Browse the repository at this point in the history
Prepared for maven publishing.
  • Loading branch information
weisJ committed Oct 20, 2019
1 parent 3320b99 commit 6aaafbe
Show file tree
Hide file tree
Showing 588 changed files with 4,973 additions and 4,185 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ venv/
# Windows
Thumbs.db
/.recommenders/
/key.gpg
121 changes: 106 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'java'
id 'maven-publish'
id 'signing'
id 'idea'
id 'cpp'
}
Expand All @@ -25,26 +26,61 @@ dependencies {
testCompile 'org.swinglabs:swingx:1.6.1'
}


group = 'com.weis'
version = '1.3'

task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}

artifacts {
archives jar
archives sourceJar
}

signing {
sign configurations.archives
}

publishing {
publications {
maven(MavenPublication) {
mavenJava(MavenPublication) {
customizePom(pom)
groupId = 'com.github.weisj'
artifactId 'darklaf'
version = '1.3'

from components.java
artifact tasks.sourceJar

// create the sign pom artifact
pom.withXml {
def pomFile = file("${project.buildDir}/generated-pom.xml")
writeTo(pomFile)
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
artifact(pomAscFile) {
classifier = null
extension = 'pom.asc'
}
}

artifact(sourceJar) {
classifier = 'sources'
}

// create the signed artifacts
project.tasks.signArchives.signatureFiles.each {
artifact(it) {
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
if (matcher.find()) {
classifier = matcher.group(1)
} else {
classifier = null
}
extension = 'jar.asc'
}
}
}
}
repositories {
maven {
name 'deploy'
url deployRepoUrl
credentials {
username = deployRepoUsername
Expand All @@ -54,26 +90,81 @@ publishing {
}
}

println "Building on OS: " + System.properties['os.name']
println "Using JDK: " + System.properties['java.home']
def customizePom(pom) {
pom.withXml {
def root = asNode()

model {
platforms {
x86 {
architecture 'x86'
// eliminate test-scoped dependencies (no need in maven central POMs)
root.dependencies.removeAll { dep ->
dep.scope == "test"
}
x64 {
architecture 'x86_64'

// add all items necessary for maven central publication
root.children().last() + {
resolveStrategy = DELEGATE_FIRST

description 'A themeable Look and Feel for java swing.'
name 'Darklaf'
url 'https://github.com/mautini/schemaorg-java'
organization {
name 'com.github.weisj'
url 'https://github.com/weisj'
}
issueManagement {
system 'GitHub'
url 'https://github.com/weisJ/darklaf/issues'
}
licenses {
license {
name 'MIT'
url 'https://github.com/weisJ/darklaf/blob/master/licence/LICENSE'
distribution 'repo'
}
}
scm {
url 'https://github.com/weisJ/darklaf'
connection 'scm:git:git://github.com/weisJ/darklaf.git'
developerConnection 'scm:git:ssh://[email protected]:weisj/darklaf.git'
}
developers {
developer {
name 'Jannis Weis'
}
}
}
}
}

model {
tasks.generatePomFileForMavenJavaPublication {
destination = file("$buildDir/generated-pom.xml")
}
tasks.publishMavenJavaPublicationToMavenLocal {
dependsOn project.tasks.signArchives
}
tasks.publishMavenJavaPublicationToMavenRepository {
dependsOn project.tasks.signArchives
}
}

println "Building on OS: " + System.properties['os.name']
println "Using JDK: " + System.properties['java.home']


compileJava {
sourceCompatibility = 11
targetCompatibility = 11
}

model {
platforms {
x86 {
architecture 'x86'
}
x64 {
architecture 'x86_64'
}
}
components {
jniplatform(NativeLibrarySpec) {
targetPlatform "x86"
Expand Down
2 changes: 1 addition & 1 deletion darklaf.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="darklaf" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="com.weis" external.system.module.version="1.3" type="JAVA_MODULE" version="4">
<module external.linked.project.id="darklaf" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11" inherit-compiler-output="true">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
5 changes: 0 additions & 5 deletions gradle.properties

This file was deleted.

18 changes: 9 additions & 9 deletions src/jniplatform/cpp/JNIDecorations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* SOFTWARE.
*/
#include "JNIDecorations.h";
#include "com_weis_darklaf_platform_windows_JNIDecorations.h"
#include "com_github_weisj_darklaf_platform_windows_JNIDecorations.h"
#include <dwmapi.h>
#include <iostream>
#include <map>
Expand Down Expand Up @@ -120,7 +120,7 @@ LRESULT CALLBACK WindowWrapper::WindowProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_setResizable(JNIEnv *env, jclass obj, jlong hwnd, jboolean res)
JJava_com_github_weisj_darklaf_platform_windows_JNIDecorations_setResizable(JNIEnv *env, jclass obj, jlong hwnd, jboolean res)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
auto wrap = wrapper_map[handle];
Expand All @@ -131,7 +131,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_setResizable(JNIEnv *env,
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_updateValues(JNIEnv *env, jclass obj, jlong hwnd,
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_updateValues(JNIEnv *env, jclass obj, jlong hwnd,
jint l, jint r, jint h)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
Expand All @@ -145,7 +145,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_updateValues(JNIEnv *env,
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_setBackground(JNIEnv *env, jclass obj, jlong hwnd, jint r, jint g, jint b)
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_setBackground(JNIEnv *env, jclass obj, jlong hwnd, jint r, jint g, jint b)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
auto wrap = wrapper_map[handle];
Expand All @@ -156,7 +156,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_setBackground(JNIEnv *env,
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_installDecorations(JNIEnv *env, jclass obj, jlong hwnd)
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_installDecorations(JNIEnv *env, jclass obj, jlong hwnd)
{
HWND handle = reinterpret_cast<HWND>(hwnd);

Expand Down Expand Up @@ -184,7 +184,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_installDecorations(JNIEnv
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_uninstallDecorations(JNIEnv *env, jclass obj, jlong hwnd)
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_uninstallDecorations(JNIEnv *env, jclass obj, jlong hwnd)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
auto wrap = wrapper_map[handle];
Expand All @@ -199,21 +199,21 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_uninstallDecorations(JNIEn
//Window functions.

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_minimize(JNIEnv *env, jclass obj, jlong hwnd)
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_minimize(JNIEnv *env, jclass obj, jlong hwnd)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
ShowWindow(handle, SW_MINIMIZE);
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_maximize(JNIEnv *env, jclass obj, jlong hwnd)
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_maximize(JNIEnv *env, jclass obj, jlong hwnd)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
ShowWindow(handle, SW_MAXIMIZE);
}

JNIEXPORT void JNICALL
Java_com_weis_darklaf_platform_windows_JNIDecorations_restore(JNIEnv *env, jclass obj, jlong hwnd)
Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_restore(JNIEnv *env, jclass obj, jlong hwnd)
{
HWND handle = reinterpret_cast<HWND>(hwnd);
ShowWindow(handle, SW_RESTORE);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6aaafbe

Please sign in to comment.