Skip to content

Commit

Permalink
(chore) fix gradle, fix licenses, fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
strazzere committed Jan 3, 2025
1 parent d923c4a commit 8b8912c
Show file tree
Hide file tree
Showing 28 changed files with 43 additions and 46 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2015 Red Naga - Tim 'diff' Strazzere
Copyright 2015-2025 Red Naga - Tim 'diff' Strazzere

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'java'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.4'
}

version = '1.0.0'
Expand All @@ -12,9 +11,10 @@ repositories {
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
testImplementation 'org.mockito:mockito-core:5.9.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.mockito:mockito-core:5.15.2'
}

allprojects {
Expand Down Expand Up @@ -49,4 +49,8 @@ test {
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED'
)

testLogging {
events "passed", "skipped", "failed"
}
}
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/AXMLResource.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/chunk/AttributeType.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/chunk/ChunkType.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/chunk/ChunkUtil.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/chunk/PoolItem.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensedimport java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,6 @@

import android.content.res.IntReader;
import android.content.res.chunk.ChunkType;
import android.content.res.chunk.types.Chunk;
import android.content.res.chunk.types.GenericChunk;

import java.io.IOException;
Expand All @@ -28,7 +27,7 @@
*
* @author tstrazzere
*/
public abstract class GenericChunkSection extends GenericChunk implements Chunk, ChunkSection {
public abstract class GenericChunkSection extends GenericChunk implements ChunkSection {

public GenericChunkSection(ChunkType chunkType, IntReader reader) {
super(chunkType, reader);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,6 @@

import android.content.res.IntReader;
import android.content.res.chunk.ChunkType;
import android.content.res.chunk.types.Chunk;
import android.content.res.chunk.types.NameSpace;

import java.io.IOException;
Expand All @@ -31,7 +30,7 @@
*
* @author tstrazzere
*/
public class ResourceSection extends GenericChunkSection implements Chunk, ChunkSection {
public class ResourceSection extends GenericChunkSection {

// TODO : Make this an ArrayList so it's easier to add/remove
protected ArrayList<Integer> resourceIDs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,6 @@
import android.content.res.IntReader;
import android.content.res.chunk.ChunkType;
import android.content.res.chunk.PoolItem;
import android.content.res.chunk.types.Chunk;
import android.content.res.chunk.types.NameSpace;

import java.io.IOException;
Expand All @@ -28,7 +27,7 @@
import java.util.Arrays;
import java.util.List;

public class StringSection extends GenericChunkSection implements Chunk, ChunkSection {
public class StringSection extends GenericChunkSection {

// This specific tag appears unused but might need to be implemented? or used as an unknown?
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/android/content/res/chunk/types/Attribute.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* 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 @@ -143,10 +143,6 @@ public String toXML(StringSection stringSection, ResourceSection resourceSection
}

buffer.append(stringSection.getString(name));
if (stringSection.getString(name).equals("protectionLevel")) {
boolean derp = true;
}

buffer.append("=\"");

// TODO : This should be a switch...
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/chunk/types/Buffer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/android/content/res/chunk/types/Chunk.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/android/content/res/chunk/types/EndTag.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* 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 @@ -30,7 +30,7 @@
*
* @author tstrazzere
*/
public class EndTag extends GenericChunk implements Chunk {
public class EndTag extends GenericChunk {

private int lineNumber;
private int commentIndex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/android/content/res/chunk/types/NameSpace.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* 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 @@ -30,7 +30,7 @@
*
* @author tstrazzere
*/
public class NameSpace extends GenericChunk implements Chunk {
public class NameSpace extends GenericChunk {

private int lineNumber;
private int commentIndex;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/android/content/res/chunk/types/StartTag.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* 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 @@ -32,7 +32,7 @@
*
* @author tstrazzere
*/
public class StartTag extends GenericChunk implements Chunk {
public class StartTag extends GenericChunk {

private int lineNumber;
private int commentIndex;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/android/content/res/chunk/types/TextTag.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* 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 @@ -30,7 +30,7 @@
*
* @author tstrazzere
*/
public class TextTag extends GenericChunk implements Chunk {
public class TextTag extends GenericChunk {

private int lineNumber;
private int commentIndex;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/diff/rednaga/AXMLPrinter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* 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 @@ -57,7 +57,7 @@ public static void main(String[] arguments) throws IOException {

if (arguments[0].equalsIgnoreCase("-v") || arguments[0].equalsIgnoreCase("-version")) {
System.out.printf("axmlprinter %s (http://github.com/rednaga/axmlprinter2)\n", VERSION);
System.out.printf("Copyright (C) 2015-2024 Red Naga - Tim 'diff' Strazzere ([email protected])\n");
System.out.printf("Copyright (C) 2015-2025 Red Naga - Tim 'diff' Strazzere ([email protected])\n");
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Naga
* Copyright 2015-2025 Red Naga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 8b8912c

Please sign in to comment.